Enforce parameter and return value types in the codebase#3348
Enforce parameter and return value types in the codebase#3348morozov merged 1 commit intodoctrine:developfrom
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. |
16ef5a7 to
2e0f3a0
Compare
0940f2e to
8de560d
Compare
Enabled
SlevomatCodingStandard.TypeHints.TypeHintDeclaration.Missing{Parameter,Return}TypeHintsniffs across the codebase.