Review main Merged

95942[TASK] Add native type declarations to Extbase class constants

Oliver Klee CR +2 V +2 Normal +81 −93 updated 09/22/26, 17:15

Commit message

Since PHP 8.3.0, class constants can have a native scalar
type declaration. [1]

[1] https://www.php.net/manual/en/language.oop5.constants.php

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benni Mack +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 19

Review log 1011

  1. Oliver Klee uploaded patch set 1 09/20/26, 08:15

  2. Wouter Wolters commented on patch set 1 09/20/26, 08:24

    If we have classes that can be extended in here via an extension this is a breaking change. Maybe mark it as such to prevent such cases?
  3. core-ci voted on patch set 1 V +1 09/20/26, 08:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108883

  4. Oliver Klee commented on patch set 1 09/21/26, 12:33

    Reply

    None of these constants are accessed using `static::`. So overwriting them in a subclass would have no effect. Does this make sense, or am I missing something?
  5. Wouter Wolters commented on patch set 1 09/21/26, 17:58

    Reply

  6. Simon Schaufelberger commented on patch set 1 09/21/26, 20:32

    Reply

    chance is 0.00000001% that somebody overwrote these values. 😊
  7. Oliver Klee commented on patch set 1 09/22/26, 13:41

    Reply

    Exactly. My point was that it does not make sense to overwrite the constant in a subclass as that has no effect: https://3v4l.org/bFeNE
  8. Benni Mack voted on patch set 1 CR +1 V +1 09/22/26, 14:53

  9. Benni Mack commented on patch set 1 09/22/26, 14:54

    Reply Unresolved

    agree. subclassing (which we don't cover with XCLASS for bw compat) + static calls only is really low-level
  10. Georg Ringer voted on patch set 1 CR +2 V +2 09/22/26, 17:15

  11. Georg Ringer merged patch set 2 09/22/26, 17:15