KnpLabs / knp-components

Various component pack, includes paginator
MIT License
745 stars 141 forks source link

[PHP 8.1] AbstractPagination::current() should either be compatible with Iterator::current() #300

Closed pyatnitsev closed 2 years ago

pyatnitsev commented 2 years ago

Hello!

There is an deprecation warning runing on PHP 8.1:

Deprecated: Return type of Knp\Component\Pager\Pagination\AbstractPagination::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/motion/vendor/knplabs/knp-components/src/Knp/Component/Pager/Pagination/AbstractPagination.php on line 24

garak commented 2 years ago

Thanks for reporting. Do you mind proposing a PR?

pyatnitsev commented 2 years ago

Sorry, but it's already fixed by https://github.com/KnpLabs/knp-components/blob/master/src/Knp/Component/Pager/Pagination/AbstractPagination.php.

I faced this warning with knplabs/knp-paginator-bundle 5.4

Can you provide a release with PHP 8.1 support?

garak commented 2 years ago

Release v3.4.0 is out.

pyatnitsev commented 2 years ago

Thank you!