[TASK] Deprecate @Extbase\Inject
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 methods: - 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:TYPO3com <noreply@typo3.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- composer.json 1 addition, 0 deletionscomposer.json
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst 68 additions, 0 deletions...eprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Controller/AbstractController.php 5 additions, 2 deletions...s/irre_tutorial/Classes/Controller/AbstractController.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Controller/ContentController.php 10 additions, 2 deletions...ns/irre_tutorial/Classes/Controller/ContentController.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Controller/QueueController.php 10 additions, 3 deletions...ions/irre_tutorial/Classes/Controller/QueueController.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/Services.yaml 9 additions, 0 deletions...ures/Extensions/irre_tutorial/Configuration/Services.yaml
- typo3/sysext/extbase/Classes/Annotation/Inject.php 1 addition, 0 deletionstypo3/sysext/extbase/Classes/Annotation/Inject.php
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php 4 additions, 0 deletionstypo3/sysext/extbase/Classes/Reflection/ClassSchema.php
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Controller/BlogController.php 10 additions, 5 deletions...nsions/blog_example/Classes/Controller/BlogController.php
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Controller/ContentController.php 10 additions, 5 deletions...ons/blog_example/Classes/Controller/ContentController.php
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/Services.yaml 9 additions, 0 deletions...tures/Extensions/blog_example/Configuration/Services.yaml
- typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php 0 additions, 11 deletions...ext/extbase/Tests/Unit/Object/Container/ContainerTest.php
- typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchema/PropertyTest.php 0 additions, 11 deletions...xtbase/Tests/Unit/Reflection/ClassSchema/PropertyTest.php
- typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php 0 additions, 23 deletions.../sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php
- typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/DummyClassWithAllTypesOfProperties.php 0 additions, 1 deletion...Reflection/Fixture/DummyClassWithAllTypesOfProperties.php
- typo3/sysext/extbase/Tests/UnitDeprecated/Object/Container/ContainerTest.php 82 additions, 0 deletions...e/Tests/UnitDeprecated/Object/Container/ContainerTest.php
- typo3/sysext/extbase/Tests/UnitDeprecated/Object/Container/Fixtures/ContainerPropertyInjectionTestClasses.php 3 additions, 3 deletions...tainer/Fixtures/ContainerPropertyInjectionTestClasses.php
- typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/ClassSchema/PropertyTest.php 39 additions, 0 deletions...ts/UnitDeprecated/Reflection/ClassSchema/PropertyTest.php
- typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/ClassSchemaTest.php 48 additions, 0 deletions...tbase/Tests/UnitDeprecated/Reflection/ClassSchemaTest.php
- typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/Fixture/DummyClassWithAllTypesOfProperties.php 8 additions, 9 deletions...Reflection/Fixture/DummyClassWithAllTypesOfProperties.php
Please register or sign in to comment