KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Starting with Koolreport Pro with PHP 8.1 #2651

Open otto@atzwanger.com opened this topic on on Apr 28, 2022 - 20 comments

otto@atzwanger.com commented on Apr 28, 2022

Hello, I try to run the sample https://winhotel.space/koolreport/examples/reports/charttable/charttable/index.php and get the following warnings: What can I do? I do not have SQL installed, as I only want to run reports without SQL.

Best regards, Otto

Deprecated: Return type of koolreport\core\DataStore::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\www\htdocs\koolreport\koolreport\core\src\core\DataStore.php on line 1372

Deprecated: Return type of koolreport\core\DataStore::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\www\htdocs\koolreport\koolreport\core\src\core\DataStore.php on line 1401

Deprecated: Return type of koolreport\core\DataStore::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\www\htdocs\koolreport\koolreport\core\src\core\DataStore.php on line 1425

Deprecated: Return type of koolreport\core\DataStore::offsetSet($index, $row) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\www\htdocs\koolreport\koolreport\core\src\core\DataStore.php on line 1385

Deprecated: Return type of koolreport\core\DataStore::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\www\htdocs\koolreport\koolreport\core\src\core\DataStore.php on line 1413

KoolReport commented on Apr 28, 2022

May I know your PHP version?

otto@atzwanger.com commented on Apr 28, 2022

Hi, thank you for taking time. My version is: PHP version: 8.1.5 Best regards, Otto

otto@atzwanger.com commented on Apr 28, 2022

I added #[\ReturnTypeWillChange] before the functions. But I am new to PHP and do not know if there are side effects. This way I have no warnings.

KoolReport commented on Apr 29, 2022

No worry, do you use composer to install koolreport pro? Have you used composer before?

otto@atzwanger.com commented on Apr 29, 2022

I am using the ZIP file

KoolReport commented on Apr 29, 2022

This issue could be related to our new developed features which is php generator. The quick solution is to return to the previous version. There is no worry, everything will work fine. We will soon release the new version then you can upgrade to that one. We will contact you via email with link of previous version.

Sebastian Morales commented on May 2, 2022

Hi, thanks for your feedback! We will issue an updated version to avoid the deprecated warning with PHP version >= 8.1 soon. Rgds,

Sebastian Morales commented on May 5, 2022

Hi Otto, we've just released KoolReport Pro 5.16.1 which should solve this PHP 8.1 deprecated warning for DataStore class. Pls try it and let us know your result. Tks,

jackson commented on Apr 18, 2023

I am also getting the same error how can i solve it

KoolReport commented on Apr 18, 2023

We've just released new version of KoolReport Pro which even compatible with latest 8.2, please upgrade.

jackson commented on Apr 18, 2023

if it is possible to work on free version

KoolReport commented on Apr 18, 2023

Yes, the new KoolReport core 6.1.0 works with PHP 8.2.

jackson commented on Apr 18, 2023

is there any demo code data store page because i am getting error on that page{Deprecated: Return type of koolreport\core\DataStore::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\XAMPP\htdocs\dcrm\koolreport\src\core\DataStore.php on line 1304

Deprecated: Return type of koolreport\core\DataStore::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\XAMPP\htdocs\dcrm\koolreport\src\core\DataStore.php on line 1333}

KoolReport commented on Apr 18, 2023

So the issue happens with PHP 8.1 and KoolReport Core 6.1.0, am I right?

jackson commented on Apr 18, 2023

php version 8.2 and koolreport core version 6.1.0

KoolReport commented on Apr 18, 2023

Thank you very much, I will report back to dev.team and come back to you.

Sebastian Morales commented on Apr 19, 2023

Jackson, pls check the file D:\XAMPP\htdocs\dcrm\koolreport\src\core\composer.json and let us know the version number. Tks,

jackson commented on Apr 19, 2023

version is "version":"6.1.0", right now i got this error {Fatal error: Cannot redeclare composerRequire719c10a74dafed9b3b68c7012b6bf2eb() (previously declared in D:\XAMPP\htdocs\dcrm\MAPI\vendor\composer\autoload_real.php:63) in D:\XAMPP\htdocs\dcrm\aws\vendor\composer\autoload_real.php on line 63}

Sebastian Morales commented on Apr 19, 2023

Ok, pls try to delete composer.lock and vendor and run composer update again.

jackson commented on Apr 19, 2023

ok

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None