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 Deprecation fixes #190

Merged

Conversation

agustingomes
Copy link
Contributor

This PR is intended to make this library PHP 8.1 compatible while maintaining backwards compatibility.

These changes are introduced to mitigate deprecations from PHP 8.1
and to avoid the lower boundaries test of PHP 8.1 to fail due to
PHPUnit resorting to the use of `$GLOBALS`.

These changes are introduced before the requirement updates to
allow them to be forward and backward compatible.
This changes makes the project explicitly compatible with PHP 8.1
and enables testing with that version in the CI.

Additionally, the configuration and requirements of PHPUnit are
updated to be fully compatible with PHP 8.1.
{
return [current($this->array)];
}

#[\ReturnTypeWillChange]
function key()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the return type of the interface (which is mixed ) is not compatible with PHP prior to version 8, the attribute is added instead of the correct type.

@CoolGoose
Copy link
Contributor

Thank you for the updates, merging this and will prepare a release next week.

@CoolGoose CoolGoose merged commit 7150ec1 into messagebird:master Feb 25, 2022
@agustingomes agustingomes deleted the php8.1/deprecations-resolution branch February 26, 2022 09:22
@agustingomes
Copy link
Contributor Author

awesome @CoolGoose thank you. Looking forward for the release.

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.

None yet

2 participants