Review main Merged

73229[TASK] Raise phpstan to level 5

Christian Kuhn CR +2 V +2 Nightmare +3701 −1 updated 01/30/22, 22:31

Commit message

Increase level from 3 to 5 and generate baseline.

Level 5 is a nice goal to fix around on for a while,
since it finds a huge list of actual code smells
worth fixing.

Level 6 adds a very huge amount of array findings,
this is too much for a while.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Jochen Roth +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Jochen Roth +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 810

  1. Christian Kuhn uploaded patch set 1 01/30/22, 19:00

  2. Oliver Klee commented on patch set 1 01/30/22, 19:08

    Technically, this change is okay. Putting my gamification hat on: As far as motivation goes, in my experience it is more satisfying and motivation to first (almost) empty the baseline for a level and then raise the level (so the goal "finish level" is not so large, which could be feel overwhelming). So I won't -1 this change, but recommend to do it later (when the baseline is empty or almost empty).
  3. core-ci voted on patch set 1 V +1 01/30/22, 19:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22739

  4. Christian Kuhn commented on patch set 1 01/30/22, 19:55

    Reply

    completely fixing a level will be hard - various things will require far-from-trivial rewrites. i would like to raise to level 5 rather quickly since this adds so many really helpful finding that actually improve the codebase and reduce bugs when fixing - dead code, if condition checks, left-side of nullable checks and similar ... level <= 3 does not do much in this area. and: having level 5 online helps not adding new code with these kind of bugs ...
  5. Christian Kuhn uploaded patch set 2 01/30/22, 22:14

  6. Jochen Roth voted on patch set 2 V +1 CR +1 01/30/22, 22:20

  7. core-ci voted on patch set 2 V +1 01/30/22, 22:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22757

  8. Stefan Bürk voted on patch set 2 V +1 CR +1 01/30/22, 22:31

  9. Christian Kuhn voted on patch set 2 V +2 CR +2 01/30/22, 22:31

  10. Christian Kuhn merged patch set 3 01/30/22, 22:31