-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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.4] Fixes for implicit nullability deprecation #20128
Conversation
PR Summary
|
Thanks for contributing. Is that a backwards compatibility break for the case of inheritance? |
Hi @samdark , thanks for the response. Both However I just realized Yii also has to support PHP 5.4 through 7.0 as well, which have no nullable type support, so this change is breaking on those versions. |
I will close this PR because we can not merge this as-is unless we either bump the minimum version to 7.1 (or drop these type declaration). |
You can target the pull request for 2.2 branch which is PHP8+ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.2 #20128 +/- ##
=========================================
Coverage 65.62% 65.62%
Complexity 11213 11213
=========================================
Files 424 424
Lines 36681 36681
=========================================
Hits 24073 24073
Misses 12608 12608 ☔ View full report in Codecov by Sentry. |
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
d4e4d08
to
cbd41f0
Compare
Thank you! I rebased for 2.2. |
@samdark AFAIK we had plans to increase min PHP version in v2.0.50 to 7.3. Something changed in that matter? If not, we could still merge this PR to master. |
Won't this be a BC break anyway because of signature mismatch? |
Quite fortunately it's not a BC break. If there any sub classes extending our classes, they will need the nullability fix to avoid the deprecation, but they will still be compatible. |
Could go into master then. @Ayesh sorry to ask but could you rebase it back? :) |
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations. Related to yiisoft#20128. This is against the `master` branch while the other PR targets the `2.2` branch. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
No problemo, I opened #20133 separately targeting |
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations. Related to #20128. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated) Co-authored-by: Wilmer Arambula <[email protected]> Co-authored-by: Alexander Makarov <[email protected]>
Closing since it will be merged from master into 2.2. |
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations.
See: