Review main Merged

93610[TASK] Declare more classes readonly

Christian Kuhn CR +2 V +2 Expert +629 −629 updated 04/10/26, 09:52

Commit message

Various classes throughout the code base can be declared
readonly quite easily. The patch does this with a bunch.

Note regarding b/w compat: This could be perceived as
potentially breaking since extending classes must be
declared readonly along the way. But:
* Commonly extended classes are intentionally excluded from
  this patch.
* Final classes are obviously safe.
* Many affected classes are declared @internal and/or
  are detail implementations that are typically not extended.
* Many classes should not be extended for various reasons.
  Examples are controllers which are usually declared
  @internal already.
* XCLASS usage is not covered by b/w compat guarantees, so
  consumers are expected to adapt. One possible approach is to
  move the core logic into a service and provide two XCLASS
  variants (one readonly, one not) to support both v13 and v14.
  That said, significant negative feedback is not anticipated
  for the classes modified in this patch.

Overall, applying readonly at the class level is beneficial.
Once introduced, it should generally remain in place, as
removing it would reduce code quality and clarity.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 166

Show 146 more files

Review log 812

  1. Christian Kuhn uploaded patch set 1 04/09/26, 23:21

  2. Christian Kuhn uploaded patch set 2 04/09/26, 23:29

  3. Christian Kuhn uploaded patch set 3 04/09/26, 23:35

  4. core-ci voted on patch set 1 V -1 04/09/26, 23:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99886

  5. core-ci voted on patch set 3 V +1 04/09/26, 23:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99888

  6. core-ci voted on patch set 2 V -1 04/09/26, 23:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99887

  7. Christian Kuhn updated the commit message in patch set 4 V +1 04/10/26, 00:02

  8. core-ci voted on patch set 4 V +1 04/10/26, 00:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99889

  9. Georg Ringer voted on patch set 4 CR +1 V +1 04/10/26, 07:04

  10. Oliver Klee voted on patch set 4 CR +1 V +1 04/10/26, 07:12

  11. Christian Kuhn voted on patch set 4 CR +2 V +2 04/10/26, 09:52

  12. Christian Kuhn merged patch set 5 04/10/26, 09:52