Review main Merged

92932[TASK] Add PHPStan rule to forbid certain PHP attributes

Elias Häußler CR +2 V +2 Normal +100 −2 updated 02/24/26, 19:33

Commit message

Adds a new configurable PHPStan rule `ForbidAttributeRule` which aims at
avoiding usage of certain PHP attributes. Currently, only the
`#[WithoutErrorHandler]` attribute from PHPUnit forbidden. This specific
attribute must not be used, since it completely disables PHPUnit's error
handler. Instead, more specific attributes like `#[IgnoreDeprecations]`
should be used instead. The remaining usage of `#[WithoutErrorHandler]`
is intended, since the related test case tests the specific behavior
of TYPO3's error handler, which may interfere with PHPUnit's default
error handler.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 912

  1. Elias Häußler uploaded patch set 1 02/20/26, 20:29

  2. Elias Häußler uploaded patch set 2 02/20/26, 20:36

  3. Elias Häußler uploaded patch set 3 02/20/26, 20:37

  4. core-ci voted on patch set 1 V +1 02/20/26, 20:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96402

  5. core-ci voted on patch set 3 V +1 02/20/26, 20:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96404

  6. core-ci voted on patch set 2 V +1 02/20/26, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96403

  7. Stefan Bürk commented on patch set 3 CR +1 V +1 02/20/26, 21:13

    thx
  8. Garvin Hicking voted on patch set 3 CR +1 V +1 02/20/26, 22:44

  9. Simon Schaufelberger voted on patch set 3 CR +1 V +1 02/24/26, 17:57

  10. Oliver Klee voted on patch set 3 V +1 02/24/26, 18:20

  11. Georg Ringer voted on patch set 3 CR +2 V +2 02/24/26, 19:33

  12. Georg Ringer merged patch set 4 02/24/26, 19:33