Skip to content
  • Christian Kuhn's avatar
    [TASK] Allow DI for extbase validators · 78fa14c1
    Christian Kuhn authored
    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
    Tested-by: default avatarcore-ci <>
    Tested-by: default avatarBenni Mack <>
    Tested-by: default avatarOliver Bartsch <>
    Tested-by: default avatarChristian Kuhn <>
    Tested-by: default avatarStefan Bürk <>
    Reviewed-by: default avatarBenni Mack <>
    Reviewed-by: default avatarOliver Bartsch <>
    Reviewed-by: default avatarChristian Kuhn <>
    Reviewed-by: default avatarStefan Bürk <>