Review main Merged Breaking

95521[!!!][TASK] Drop SingletonInterface from DI-only Extbase classes

Benni Mack CR +2 V +2 Normal +107 −55 updated 09/01/26, 19:48

Commit message

Follow-up to #110578. SingletonInterface only turns a class into a
shared and public service so GeneralUtility::makeInstance() can
reach it. Sharing is the container default anyway, so the marker
has no effect on services that are injected, and is removed from
AbstractTypeConverter, ValidatorResolver, ExtensionService and
QueryObjectModelFactory.

Two classes have to stay reachable by class name and say so
explicitly now, instead of relying on the marker as a side effect:

* ValidatorResolver is pulled from the container by form
  Renderables, which are not services themselves, see
  AbstractRenderable::createValidator().
* UploadedFileReferenceConverter carries no "extbase.type_converter"
  tag. It is set explicitly on the property mapping configuration
  and fetched from form elements, so it is declared public rather
  than tagged: the tag would also enroll it in the automatic
  resolution by source and target type.

The remaining converters are tagged and are made public by
TypeConverterPass already, so they are unaffected.

The form PropertyMappingConfiguration event listener built the
ValidatorResolver through makeInstance() and injects it now.

ExtensionService receives its ConfigurationManager through the
constructor instead of a setter, which turns a missing dependency
into an immediate error rather than a late one, and its memoized
target pids move from an instance property into the runtime cache.
Being free of state, it is declared non-shared. The memoization
was keyed by plugin signature only while the underlying lookup
filters by language, so a second language was served the pid of
the first one. The language is part of the cache identifier now.

QueryObjectModelFactory creates its query object model values with
"new". All of those calls passed constructor arguments and thus
never consulted the container to begin with. They are no longer
subject to XCLASSing, and the sharper typing revealed that
comparison() accepted any integer as operator while Comparison
expects QueryInterface::OPERATOR_*, which is documented now.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 10

Review log 911

  1. Benni Mack uploaded patch set 1 09/01/26, 13:26

  2. core-ci voted on patch set 1 V +1 09/01/26, 13:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107492

  3. Stefan Bürk voted on patch set 1 CR +1 V +1 09/01/26, 19:22

  4. Wouter Wolters commented on patch set 1 09/01/26, 19:31

    ValidatorResolver.php:40

    Why is this comment not included in the PHPdoc?

    UploadedFileReferenceConverter.php:53

    same here, why not include it in the PHPdoc above?
  5. Benni Mack commented on patch set 2 CR +1 V +1 09/01/26, 19:33

    Published edit on patch set 1.
  6. Benni Mack commented on patch set 2 09/01/26, 19:34

    ValidatorResolver.php:40 Reply

    its related to the Attribute, not the class, but I adapted it.

    UploadedFileReferenceConverter.php:53 Reply

    its related to the Attribute, not the class, but I adapted it.
  7. Stefan Bürk voted on patch set 2 CR +1 V +1 09/01/26, 19:35

  8. Wouter Wolters voted on patch set 2 CR +1 V +1 09/01/26, 19:40

  9. core-ci voted on patch set 2 V +1 09/01/26, 19:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107512

  10. Stefan Bürk voted on patch set 2 CR +2 V +2 09/01/26, 19:48

  11. Stefan Bürk merged patch set 3 09/01/26, 19:48