Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[ErrorHandler] trigger deprecations for@final properties#45360
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
cf4b347 to5d0282fCompare
derrabus left a comment
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.
Looks good. Maybe we should document a way forward.
Uh oh!
There was an error while loading.Please reload this page.
5d0282f to92b917eCompare92b917e to3ec3d6bCompare
fancyweb left a comment
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.
I'm approving the code but some tests are missing for me:
- test with two classes in the same namespace
- test with a class outside the
Symfony\namespace - test that the behavior is different for a static property
- test that the behavior is different when the property is typed
I can help you if you want.
3ec3d6b tod535cedComparenicolas-grekas commentedFeb 9, 2022
PR welcome on my fork :)
I removed that check |
d535ced to0c4a7c7Comparenicolas-grekas commentedFeb 9, 2022
This PR will be green after#45371 is merged. Review welcome. |
0c4a7c7 to061943aCompare@final properties@final properties@final properties@final propertiesc00cd1b toeada4c0Comparenicolas-grekas commentedFeb 10, 2022
Thank you@fancyweb. |
…grekas)This PR was merged into the 7.0 branch.Discussion----------Add types to public and protected properties| Q | A| ------------- | ---| Branch? | 7.0| Bug fix? | no| New feature? | yes| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -:hot_face:Allowed by#45360Follows#51068 and#51067Commits-------7ea2461 Add types to public and protected properties
Uh oh!
There was an error while loading.Please reload this page.
This PR makes DebugClassLoader trigger a deprecation when a property in a child class is redefined while the same property is
@finalon the parent class (the deprecation is silenced when both classes live in the exact same namespace or when the child property is deprecated.)It also makes all properties in the
Symfony\namespace implicitly@final, unless they are typed. The goal here is to be able to add types to all properties in 7.0, thus fixing#43600.