Skip to content
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

PHP 8.1 compatibility #278

Merged
merged 1 commit into from
Dec 4, 2021
Merged

PHP 8.1 compatibility #278

merged 1 commit into from
Dec 4, 2021

Conversation

MyIgel
Copy link
Contributor

@MyIgel MyIgel commented Nov 30, 2021

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)

by setting #[ReturnTypeWillChange] for JsonSerializable and IteratorAggregate interface implementations
@MyIgel MyIgel changed the title Be PHP 8.1 compatible PHP 8.1 compatibility Nov 30, 2021
@MyIgel
Copy link
Contributor Author

MyIgel commented Dec 4, 2021

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
Copy link
Member

oscarotero commented Dec 4, 2021

sorry for the delay. Thank you!

@oscarotero oscarotero merged commit bb5b13b into php-gettext:master Dec 4, 2021
@MyIgel MyIgel deleted the php-8.1 branch December 4, 2021 12:34
@cedric-anne
Copy link

Hi,

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

Regards

@oscarotero
Copy link
Member

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

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

Successfully merging this pull request may close these issues.

PHP 8.1 compatibility: warnings about JsonSerializable compatibility
3 participants