Review main Merged

73631[TASK] Allow DI for extbase validators

Christian Kuhn CR +2 V +2 Hard +457 −215 updated 02/22/22, 08:40

Commit message

With #92238, it has been postulated that Extbase
validators should not be dependency injection aware.
Further places following this idea have been done
in v11 with #94451 and #94384. A final breaking
ReST file has been added with #95026.

All of that is pretty unfortunate and there is
simply no reason that Extbase validators can
not get dependencies injected, no matter if
they're not singletons.

This patch specifically targets v11 to allow
dependency injection in Extbase validators again
if extension authors really need this, and don't
want to stick to manual dependency retrieval
as outlined in #95026. This patch should basically
mitigate issues for extension upgrades and paves
the way for a more solid general solution in v12.

Extension authors have a more smooth upgrade path,
especially when supporting two core versions at
the same time.

The v12 version of this patch is identical with
v11 for now - The breaking interface change,
adapting all core validators, and declaring core
validators 'final' in v12 will be done with a
dedicated v12 patch as soon as this
v11 tailored version has been aligned on.

Note all of this is pretty hairy and the solution
outlined with the patch for v11 hopefully gives the
maximum amount of compatibility without being
breaking again, with giving extension authors
additional options, and having v12 options to
further mitigate this complex mess.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 5

Files 22

Show 2 more files