-
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 5.x broken #2055
Comments
PHPWord works correctly with PHP 5.3+. Add information, if something doesn't work.. |
When installing via composer 0.18.1, the Line 15++: use function ... (>=5.6) I had a quick look into the other files from the laminas libraries ... they all seem to have the same problem. |
This bug is introduced in 0.18.1 version via PR #2032. "replace": {
"laminas/laminas-zendframework-bridge": "*"
}, |
Thanks for the fast answer! 👍 I managed to get it to run, but I also had to remove the laminas-escaper with
Now PHPOffice seems to work, not sure where the escaper library is actually needed. I am only using the template part of PHPOffice. |
PHPWord using laminas/laminas-escaper library with minimal version 2.2, which is compatible with PHP 5.3, see https://github.com/laminas/laminas-escaper/blob/2.2.10/composer.json#L28 |
Ah, ok. Then an older version of the laminas escaper library must be installed (2.2), as the latest version also uses array declaration shortcut operators (>=5.4). I got everything running with php 5.3.x with following
Thanks again for the help. |
I have to maintain some outdated PHP 5.x installations.
The laminas libraries break the compatibility with PHP 5.x for me, as they require php >=v 7. Requirements for PHP in file README.md should probably be updated.
The text was updated successfully, but these errors were encountered: