Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

PHP 8.1 Error #873

Open
agus-prawoto opened this issue Mar 11, 2022 · 4 comments
Open

PHP 8.1 Error #873

agus-prawoto opened this issue Mar 11, 2022 · 4 comments

Comments

@agus-prawoto
Copy link

Hi, I'm using Codeigniter 4 with PHP 8.1 and trying to run this code:

$filename = 'somefile.xlsx';
$reader = ReaderEntityFactory::createReaderFromFile($filename);
$reader->open($filename);

But I got the following error

Fatal error: During inheritance of XMLReader: Uncaught ErrorException: Return type of Box\Spout\Reader\Wrapper\XMLReader::read() should either be compatible with XMLReader::read(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\xampp-8.1.2\htdocs\app\ThirdParty\Spout\src\Spout\Reader\Wrapper\XMLReader.php:86

Previously I used PHP 8.0 and it just work fine
Please help, thank you

@Slamdunk
Copy link

Fixed and released in openspout/openspout:v3.7.0

@agus-prawoto
Copy link
Author

Hi, thank you for your quick response

I've tried the OpenSpout, running same code:
$filename = 'somefile.xlsx';
$reader = ReaderEntityFactory::createReaderFromFile($filename);
$reader->open($filename);

But got another error:

Fatal error: During inheritance of Iterator: Uncaught ErrorException: Return type of OpenSpout\Reader\XLSX\SheetIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\xampp-8.1.2\htdocs\ci4\api\app\ThirdParty\OpenSpout\src\Reader\XLSX\SheetIterator.php:80 Stack trace: #0 D:\xampp-8.1.2\htdocs\ci4\api\app\ThirdParty\OpenSpout\src\Reader\XLSX\SheetIterator.php(12)

Please help
Thank you

@Slamdunk
Copy link

Hi, can you try the new release v3.7.1?

@agus-prawoto
Copy link
Author

agus-prawoto commented Mar 14, 2022

Perfect !!!
Work like expected
Thank you... :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants