Review main Merged

65835[TASK] Deprecate @Extbase\Inject

Alexander Schnitzler CR +2 V +2 Hard +330 −79 updated 12/14/20, 22:05

Commit message

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.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 22

Show 2 more files

Review log 2133

Show 58 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 09/23/20, 11:09

  2. TYPO3com voted on patch set 1 V -1 09/23/20, 11:20 Completed build in 11m 04s on Wed, 23 Sep, 11:20 AM Test Summary: 460 of 74167 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5850

  3. Alexander Schnitzler uploaded patch set 2 09/23/20, 11:48

  4. TYPO3com voted on patch set 2 V -1 09/23/20, 12:04 Completed build in 15m 03s on Wed, 23 Sep, 12:04 PM Test Summary: 157 of 74167 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5853

  5. Alexander Schnitzler uploaded patch set 3 09/23/20, 12:14

  6. Alexander Schnitzler uploaded patch set 4 09/23/20, 12:26

  7. TYPO3com voted on patch set 3 V -1 09/23/20, 12:27 Completed build in 12m 42s on Wed, 23 Sep, 12:27 PM Test Summary: 85 of 74167 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5855

  8. Alexander Schnitzler wrote 09/23/20, 12:31

    Topic set to extbase
  1. TYPO3com voted on patch set 4 V -1 09/23/20, 12:44 Completed build in 18m 23s on Wed, 23 Sep, 12:44 PM Test Summary: 1 of 74167 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5857

  2. Alexander Schnitzler uploaded patch set 5 09/23/20, 13:08

  3. TYPO3com voted on patch set 5 V -1 09/23/20, 13:20 Completed build in 12m 15s on Wed, 23 Sep, 01:20 PM Test Summary: 84 of 74167 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5858

  4. Alexander Schnitzler uploaded patch set 6 09/23/20, 13:50

  5. TYPO3com voted on patch set 6 V -1 09/23/20, 13:52 Completed build in 32s on Wed, 23 Sep, 01:52 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5861

  6. Alexander Schnitzler uploaded patch set 7 09/23/20, 13:53

  7. TYPO3com voted on patch set 7 V +1 09/23/20, 14:07 Completed build in 13m 28s on Wed, 23 Sep, 02:07 PM Test Summary: 73671 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5862

  8. Alexander Schnitzler uploaded patch set 8 09/23/20, 16:05

  9. TYPO3com voted on patch set 8 V -1 09/23/20, 16:18 Completed build in 12m 40s on Wed, 23 Sep, 04:18 PM Test Summary: 42 of 74179 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5881

  10. Alexander Schnitzler uploaded patch set 9 12/05/20, 11:34

  11. TYPO3com voted on patch set 9 V +1 12/05/20, 11:44 Completed build in 09m 42s on Sat, 5 Dec, 11:44 AM Test Summary: 32412 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7823

  12. Alexander Schnitzler commented on patch set 9 12/05/20, 12:22

    This change is ready for review.
  13. Benjamin Franzke uploaded patch set 10 12/05/20, 20:38

  14. TYPO3com voted on patch set 10 V +1 12/05/20, 20:46 Completed build in 08m 31s on Sat, 5 Dec, 08:46 PM Test Summary: 32412 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7839

  15. Benjamin Franzke uploaded patch set 11 12/06/20, 06:53

  16. TYPO3com voted on patch set 11 V +1 12/06/20, 07:02 Completed build in 08m 47s on Sun, 6 Dec, 07:02 AM Test Summary: 32410 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7844

  17. Torben Hansen voted on patch set 11 CR +1 12/06/20, 18:06

  18. Georg Ringer commented on patch set 11 CR -1 12/08/20, 18:18

    Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst:30

    please add examples to at least the most simpliest of those as otherwise extension developers who are more the extension-builder users are completly left alone

    Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst:34

    either use Dependency Injection
  19. Alexander Schnitzler commented on patch set 11 12/08/20, 19:06

    Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst:30 Reply

    What about directing the users to the documentation instead? Do we need to repeat ourselves all the time? https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/DependencyInjection/Index.html This exists and I don't want to copy it over to this doc to be honest.

    Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst:34 Reply

    either? Sorry, don't understand the sentence.
  20. Benjamin Franzke uploaded patch set 12 12/14/20, 15:11

  21. Benjamin Franzke commented on patch set 12 12/14/20, 15:11

    Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst:30 Reply

    Done

    Deprecation-92386-ExtbasePropertyInjectionIsDeprecated.rst:34 Reply

    Done
  22. TYPO3com voted on patch set 12 V +1 12/14/20, 15:21 Completed build in 09m 43s on Mon, 14 Dec, 03:21 PM Test Summary: 32412 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8171

  23. Georg Ringer voted on patch set 12 V +1 CR +1 12/14/20, 21:20

  24. Benjamin Franzke voted on patch set 12 V +2 CR +2 12/14/20, 22:05

  25. Benjamin Franzke merged patch set 13 12/14/20, 22:05