Why new PRs stick to old style and do not use typed properties, parameters and returns when I sense that laravel community is eager to adopt php's new features? #51378
Unanswered
marius-mcp
asked this question in
Q&A
Replies: 1 comment
-
@taylorotwell I remember the PSR12 has been rejected by laravel in the past but at least parts from it could be adopted in new PRs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I mean I can see Attributes "abused", ?-> used without isset and instanceof check and so on, BUT adopting typed properties, parameters and returns is ignored even if these are around since php 7.4 and ARE more useful than Attributes for example.
PSR12 is better than PSR2. It helps developers write cleaner code with less bugs. I have been using it since 2018.
You will say Laravel has a lot of magic and so typed things are not applicable. I beg to differ. Even if mixed is used, it would benefit us all if PSR12 could be adopted.
Also Laravel lacks proper documentation of exceptions.
I mean:
You will say we have the exception handler that will catch it....well if don't care about data leaks yes, that could be a solution...
Beta Was this translation helpful? Give feedback.
All reactions