• Alexander Schnitzler's avatar
    [TASK] Deprecate @Extbase\Inject · 64c8a784
    Alexander Schnitzler authored and Benjamin Franzke's avatar Benjamin Franzke committed
    Since core dependency injection is in place and is about to
    replace the extbase dependency injection, marking properties
    with the @Extbase\Inject annotation to invoke property injection is
    deprecated and must be replaced by one of the following di
    - constructor injection: works both with core and extbase di
      and is well suited to make extensions compatible for multiple
      TYPO3 versions.
    - setter injection: Basically the same like constructor injection.
      Both the core and extbase di can handle setter injection and
      both are supported in different TYPO3 versions.
    - (core) property injection: This kind of injection can be used
      but it requires the configuration of services via a Services.yaml
      in the Configuration folder of an extension.
    The recommended way is constructor injection. Not only is it the
    most compatible version of di, it also brings the advantage of
    clearly showing dependencies of a class. Also, it quickly shows
    if dependencies stack up which indicates that the service should
    be refactored.
    Releases: master
    Resolves: #92386
    Change-Id: I61afbb6bb15b136c200849c6c8f2cd6211d4c306
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65835
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
    Tested-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
    Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
    Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
Analyzing file…