-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enforce parameter and return value types in the codebase #3348
Conversation
This looks impossible to review and properly document. Who don't we do it in smaller parts? Also eliminating type casts/checks is probably task for separate PR (PHPStan should catch them). |
I just though about the same. Will double check if PHPStan can do that and will file a ticket otherwilse and attach it here. |
It definitely does, but probably on higher level than we have. |
I'd better try to come up with a systems approach of reviewing what's already done then splitting it apart and then putting back together. It took me a week to make this change including almost one day full time, and I may not have that much time for additional coding. |
I'd better have the branch destabilized but with all the code changes in place instead of not doing anything. AFAIK, the work on a higher PHPStan level and enabling strict types was started long ago but wasn't finished. With this approach, we can have more non-covered breakages reported by users of |
Hmm, where? Maybe I just forgot. |
Possibly a good idea to have #2854 in first - would catch a lot of runtime errors due to type mismatch, if there are any left |
Yea, we discussed that internally. |
0940f2e
to
8de560d
Compare
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enforce parameter and return value types in the codebase
Enabled
SlevomatCodingStandard.TypeHints.TypeHintDeclaration.Missing{Parameter,Return}TypeHint
sniffs across the codebase.