-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ZipStream3 initialization issue #3619
Comments
Same as #3616 (comment) except that you need If it is possible, I recommend updating to an actively maintained PHP version, which solves this as well. |
Understood but composer.json said it support
https://github.com/PHPOffice/PhpSpreadsheet/blob/master/composer.json |
PhpSpreadsheet does support PHP 7.4 (at least for the next few weeks). There is nothing in the PhpSpreadsheet that will fail if you are running PHP 7.4. However:
but an install should only use version 3.0+ if you are running PHP 8.1 or above, only use version 2.2+ if you are running PHP 8.0.x. If you are running PHP 7.4.x, then version 2.1.x should be installed. If you have forced the installation of zipstream-php > 2.1, then you will have problems with PHP 7.4 P.S. |
downgrading maennchen/zipstream-php to 2.1 fixed the issue on php version 7.4. composer require maennchen/zipstream-php:^2.1 |
Closing as duplicate of #3615 (if it is still a problem). |
A possible workaround if downgrading ZipStream is not possible is to modify phpoffice so that the call is more compatible: ` namespace PhpOffice\PhpSpreadsheet\Writer; use ZipStream\Option\Archive; class ZipStream2 |
This is:
[2023-06-18 12:52:57] production.ERROR: syntax error, unexpected ':', expecting ')' {"exception":""Symfony\\Component\\Debug\\Exception\\FatalThrowableError: syntax error, unexpected ':', expecting ')' in \/data\/app\/hris-api\/vendor\/phpoffice\/phpspreadsheet\/src\/PhpSpreadsheet\/Writer\/ZipStream3.php:16
Stack trace:\
Facing the issue with php 7.4, Laravel 5.8 and PhpSpreadsheet 1.29.0
The text was updated successfully, but these errors were encountered: