Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Routing] adding typehint to some functions and parameters#51005
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
wouterj commentedJul 17, 2023
Hi! Adding a return type is a backwards compatibility break for child classes overriding this method. In 6.4, all methods have either a PHP return type or an For the same reasons, we've also limited property types to private or internal properties, or properties on final or internal classes (see#41924 for a bit more context). Finally, I'm not sure what our policy is with CPP. I'm not too fond of it, as it's merely syntax sugar and can cause edge-case BC breaks as well:#45721 (comment) |
nicolas-grekas commentedJul 19, 2023
Closing as explained by@wouterj, thanks for proposing. |
So i was walking around the Routing component for diverse reasons, and I came across some not type hinted:
I've also taken the freedom to add the property accessibility into the constructor since we are using php81
I have absolutely no idea if this PR is welcome, as this might be something you would not want to add to this framework for now.
Feel free to share your thoughts and opinions about this PR, I'll gladly learn whatever you might say about it !
Thanks again for your time