php-gettext / Gettext

PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
MIT License
688 stars 134 forks source link

PHP 8.1 compatibility #278

Closed MyIgel closed 2 years ago

MyIgel commented 2 years ago

By setting #[\ReturnTypeWillChange] for JsonSerializable and IteratorAggregate interface implementations the warnings are fixed. As # was previously only a sign for a comment, its backwards compatible to older PHP versions.

Closes #277 (PHP 8.1 compatibility: warnings about JsonSerializable compatibility)

MyIgel commented 2 years ago

Eventually @oscarotero could have a look and release a new patched version? I think that anyone who wants to use PHP 8.1 and converts warnings to exceptions during testing would greatly appreciate it as it currently breaks unit tests ^^

oscarotero commented 2 years ago

sorry for the delay. Thank you!

cedric-anne commented 2 years ago

Hi,

Thanks fo this patch. For information, version 5.6.1 has not been published to packagist.

Regards

oscarotero commented 2 years ago

@cedric-anne Thanks for advising. It's fixed now.