1 unresolved comment The owner has to answer or resolve it. Show the first one

Review main Ready for review

98193[TASK] Move AbstractDomainObject property constants to own class

Alexander Schnitzler CR +1 V +1 Hard +562 −401 updated 11/29/26, 19:42

Commit message

The persistence layer needs the names of the framework properties
(uid, pid, _localizedUid, _languageUid, _versionedUid), but had to
reference AbstractDomainObject, the base class of the models, to get
them.

The constants now live in the new final class DomainObjectProperty.
The constants in AbstractDomainObject are deprecated and point to the
new ones, so existing code, including access through model
subclasses, keeps working until they are removed in v16.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/93/98193/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/93/98193/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Oliver Klee +1
  • Verified V +1 Needs a vote
    • Oliver Klee +1
    • core-ci +1 CI

Merge conflicts 16

Show 11 more changes Show less

Issues 1

Files 18

Review log 910

  1. Alexander Schnitzler uploaded patch set 1 11/29/26, 13:16

  2. core-ci voted on patch set 1 V +1 11/29/26, 13:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115959

  3. Alexander Schnitzler wrote 11/29/26, 14:40

    Topic set to extbase
  4. Alexander Schnitzler commented on patch set 1 11/29/26, 14:41

  5. Torben Hansen commented on patch set 1 11/29/26, 16:19

    Deprecation-111657-AbstractDomainObjectPropertyConstants.rst:35

    Unsure about this. Is`nt this possible in PHP 8.5 (which is the minimum requirement for TYPO3 v15).
  6. Oliver Klee commented on patch set 1 V +1 11/29/26, 17:32

    DomainObjectProperty.php:23

    As this class holds not data and no functionality, could/should it be an interface instead?
  7. Oliver Klee commented on patch set 1 11/29/26, 18:00

    AbstractDomainObject.php:32

    As the whole class is `@internal`, it's not covered by our BC promise, and hence we probably don't need to deprecate the old constants and can remove them directly.
  8. Alexander Schnitzler commented on patch set 1 11/29/26, 18:38

    Deprecation-111657-AbstractDomainObjectPropertyConstants.rst:35 Reply Unresolved

    You are right but I am not sure if and how TYPO3 handles #\Deprecated. Never seen this being used in the past. Do you know?

    AbstractDomainObject.php:32 Reply

    First, I thought so too. Then I thought how people would possibly use this and that would probably be via `self::` or `static::` which isn't that easy to spot. With rector, AI and IDE's however, that replacement is super easy. When you're hit by this removal, it's easy to solve. My opinion on the matter isn't that strong. Would love to see those constants go in 15 but wouldn't mind to keep them for a version...

    DomainObjectProperty.php:23 Reply

    I think there is a slight difference between choosing an interface or a class for namespaced constants. The final, non instantiable class makes sure the constants don't end up in child classes via self/static whereas the interface can be implemented by any class and then inherits the constants. That's what I want to get rid of here.
  9. Oliver Klee commented on patch set 1 11/29/26, 19:42

    DomainObjectProperty.php:23 Reply

    Ah, makes sense. Thank you for the explanation!
  10. Oliver Klee commented on patch set 1 CR +1 11/29/26, 19:42

    AbstractDomainObject.php:32 Reply

    Acknowledged