Replies: 2 comments
-
This seems to me to be a bit of a no-brainer unless adding typing to public properties / attributes can break things when existing code which is expecting something else receives a strongly typed value instead. |
Beta Was this translation helpful? Give feedback.
-
We also see this poor documentation of possible throw able not documented or return types not declared or parameters without a type to be annoying... but if implemented the framework would suffer big time and there will be many braking changes because of the 'magic' it uses: forwardCallTo, _call etc. because it is dificult cu document with | all return type of values. Also if you look in the documentation you don't see examples that declare the $query param type in callbacks when using eloquent for example, even it sometimes it is a Query Builder and other times it is an Eloquent Builder. Good thing is that when writing your own code you can use them with typed parameters and nothing breaks. On this note, It is a good idea to always espect throwable when executing queries or when interacting with cache, file system, etc. We for example follow PSR12 codding standard but for some files we can't make it 100% PSR12 because of inheritance from laravel/lyumen. Anyway it would be great to have it updated to php 8 but I doubt it will ever be implemented... |
Beta Was this translation helpful? Give feedback.
-
Hello, everyone
54 votes ·
Beta Was this translation helpful? Give feedback.
All reactions