Review main Merged

71272[DOCS] Recommend $container->hasDefinition() for optional dependencies

Benjamin Franzke CR +2 V +2 Easy +11 −5 updated 09/26/21, 08:41

Commit message

ExtensionManagementUtility() usage in Services.php has never been an
intended usage, but was technically possible in TYPO3 v10 as a side
effect of runtime activated packages, and therefore got documented in
example code.

Container builds should generally be stateless and should only take
explicit service configuration and ContainerBuilder compile time
state into account. Therefore conditional service registration should
only use compile time container state, which can be achieved with:
ContainerBuilder->hasDefinition(ClassNameOfOptionalDependency::class)

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Chris Müller +1
    • Jörg Bösche +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Chris Müller +1
    • Jörg Bösche +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 912

  1. Benjamin Franzke uploaded patch set 1 09/25/21, 12:51

  2. Helmut Hummel commented on patch set 1 V +1 09/25/21, 13:02

    WidgetRegistration.rst:258

    EMU can be removed here
  3. core-ci voted on patch set 1 V +1 09/25/21, 13:08 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17185

  4. Benjamin Franzke uploaded patch set 2 09/25/21, 15:58

  5. Benjamin Franzke commented on patch set 2 09/25/21, 15:58

    WidgetRegistration.rst:258 Reply

    Done
  6. core-ci voted on patch set 2 V +1 09/25/21, 16:14 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17189

  7. Oliver Klee updated the commit message in patch set 3 09/25/21, 17:15

  8. core-ci voted on patch set 3 V +1 09/25/21, 17:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17191

  9. Chris Müller voted on patch set 3 V +1 CR +1 09/25/21, 19:55

  10. Jörg Bösche voted on patch set 3 V +1 CR +1 09/26/21, 01:26

  11. Helmut Hummel voted on patch set 3 V +2 CR +2 09/26/21, 08:41

  12. Helmut Hummel merged patch set 4 09/26/21, 08:41