-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add return typehints to Extensions ArrayAccess #53
base: master
Are you sure you want to change the base?
Conversation
This package works find on PHP 8.0 but fails on PHP 8.1 without the return typehints for We are using it as a depencency of |
@matthew-inamdar Can you please merge this? |
@matthew-inamdar This fix allows us to use the package, can you please merge this? |
Sorry for the delay - I've been struggling for time recently. These type hints will be a breaking change for currently supported PHP versions. If we added the |
@matthew-inamdar Yes, that would suffice! |
@matthew-inamdar Thinking about my previous comment, adding a ReturnTypeWillChange attribute will be a bigger change than adding return type as it will drop support for any PHP version below 8.1. What exactly are you worried about regarding breaking changes with return types? The interface in PHP already has the return types specified, so it should not be really any issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe PHP 8.0 and 8.1 can also be added to the PHP matrix in .github/workflows/tests.yml
on line 16?
This won't be an issue due to the way attributes were designed in PHP. The attribute will work fine in php8.0 as no instance is actually created for it. As for any PHP version before PHP 8, the TL;DR using @matthew-inamdar if you would like, I could open a new PR with the |
@matthew-inamdar would be great to get your accept 🤓 |
This PR is now obsolete as #55 as discussed above has been merged and released in 2.9.0. @judgej or @matthew-inamdar this PR can be closed then, right? |
Hey, this is still needed. On
This MR fixes the deprecation. Thank you! Rebase: adrienbrault@f24ceb1 |
Fix for #52