-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with PHP 7.4, PHP 8.0 and migrate to Laminas Escaper #1946
Conversation
avoid notice: "Invalid characters passed for attempted conversion, these have been ignored"
- in PHP 7.3, 7.4 not necessary remove ignore platforms
… not contain any null bytes
version 6.3.5 doesn't support PHP 5.3, fixed via tecnickcom/TCPDF#197, pending new release.
Laminas Escaper
Laminas Escaper
@@ -454,7 +454,7 @@ private function setSourceType() | |||
} else { | |||
$this->sourceType = self::SOURCE_GD; | |||
} | |||
} elseif (@file_exists($this->source)) { | |||
} elseif ((strpos($this->source, chr(0)) === false) && @file_exists($this->source)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use PHP8-functions here, with a polyfill from Symfony.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any new feature in php8 or symfony polyfills to solve this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
str_contains doesn't solve much... Symfony polyfills require PHP 7, not compatible with PHP 5.x https://github.com/symfony/polyfill/blob/master/src/Php80/composer.json#L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a serious problem? We should drop support for PHP 5 ASAP: #1948
And no, it ‘str_contains‘ doesn't solve a problem, but I think it's nicer. It improves readability for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is problem, because this PR is about compatibility with PHP 8 and PHP 7.4, not about drop support old PHP versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true. I opened an issue, I'd like to hear your opinion :)
@troosan Can you review it? |
Let's release this changes please ;) |
Looking forward to this PR being merged! Is there anything I could do to contribute? |
@troosan doesn't seem to be active here. How can we contact him? Are there any other maintainers? |
@stephanvierkant Thanks for this nice work. I've been quite absent for quite some time indeed. |
indeed, will definitely mention it in the release notes |
…/laminas-zendframework-bridge This commit fixes the BC break introduced by PHPOffice#1946 where it was stated that phpword replaces package laminas/laminas-zendframework-bridge which is not the case. Package laminas/laminas-zendframework-bridge only was replaced from phpword.
Fix BC break in #1946. This package does not replace laminas/laminas-zendframework-bridge
Description
Zend\Escaper
toLaminas Escaper
For full compatibility with php 8.0 require PR PHPOffice/Common#34
Fixes #1944
Fixes #1874
Fixes #1797
Checklist:
composer run-script check --timeout=0
and no errors were reported