Skip to content
Snippets Groups Projects
Commit 72d16bc3 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Allow DI for extbase validators

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.

Resolves: #96332
Related: #92238
Related: #95026
Related: #94451
Related: #94384
Releases: main, 11.5
Change-Id: I5fea15c9b73c59e5d7c3212a0842bc9a3413d2a1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73630


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent f08fe346
Branches
Tags
No related merge requests found
Showing
with 457 additions and 157 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment