Review main Merged

74547[TASK] Ignore PHPStan errors in GeneralUtilityTest for contract violations

Oliver Klee CR +2 V +2 Easy +5 −25 updated 05/08/22, 08:41

Commit message

In tests for `GeneralUtility` that explicitly violate the contract
(and test the correct error handling in those cases), PHPStan errors about
the contract violation are not helpful and rather clutter the
PHPStan baseline.

So these errors are now silenced with an annotation in the corresponding
tests, allowing us to focus on PHPStan errors about actual issues.

Note: We only use this annotation in tests, not in production code,
to avoid silencing errors about actual problems.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1216

  1. Oliver Klee uploaded patch set 1 05/07/22, 12:44

  2. Oliver Klee rebased onto patch set 2 05/07/22, 12:46

  3. core-ci voted on patch set 2 V +1 05/07/22, 12:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26959

  4. core-ci voted on patch set 1 V +1 05/07/22, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26957

  5. Stefan Bürk commented on patch set 2 V +1 CR +1 05/07/22, 14:59

    Right usage for the phpstan ignore annotation. Only for tests explicitly testing broken code or violations.
  6. Oliver Klee commented on patch set 2 05/07/22, 15:04

    > Right usage for the phpstan ignore annotation. Only for tests explicitly testing broken code or violations. I really love learning from each other!
  7. Benjamin Franzke uploaded patch set 3 05/07/22, 15:53

  8. core-ci voted on patch set 3 V +1 05/07/22, 16:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26963

  9. Oliver Klee voted on patch set 3 CR +1 05/07/22, 16:02

  10. Nikita Hovratov updated the commit message in patch set 4 05/07/22, 16:13

  11. Nikita Hovratov voted on patch set 4 V +1 CR +1 05/07/22, 16:14

  12. core-ci voted on patch set 4 V +1 05/07/22, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26964

  13. Oliver Klee voted on patch set 4 V +1 CR +1 05/07/22, 16:26

  14. Oliver Klee voted on patch set 4 V 0 CR 0 05/07/22, 16:36

  15. Christian Kuhn voted on patch set 4 V +2 CR +2 05/08/22, 08:41

  16. Christian Kuhn merged patch set 5 05/08/22, 08:41