Review main Merged

69100[TASK] Avoid ObjectManager->get() in EXT:backend

Oli Bartsch CR +2 V +2 Easy +2 −7 updated 05/11/21, 12:30

Commit message

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Benjamin Franzke +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 89

  1. Oli Bartsch uploaded patch set 1 05/10/21, 19:35

  2. core-ci voted on patch set 1 V +1 05/10/21, 19:45 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11362

  3. Benni Mack commented on patch set 1 05/10/21, 21:32

    ShortcutButtonViewHelper.php:77

    probably won't work, as ExtensionService still contains inject methods.
  4. Oli Bartsch commented on patch set 1 05/11/21, 08:07

    ShortcutButtonViewHelper.php:77 Reply

    I've tested this and both ways I get the same instance (including the configurationManager). Actually `inject*` shouldn't be a problem here since the service is made available in https://github.com/TYPO3/TYPO3.CMS/blob/1bf66b3dbc3360e44a7ff0055e1d7618551286c2/typo3/sysext/extbase/Classes/ServiceProvider.php#L48. Also, other view helpers, e.g. the "parent" ModuleLayoutViewHelper, are instantiating the ExtensionService the same way: https://github.com/TYPO3/TYPO3.CMS/blob/a560b9b09ce67654c91ea72707b7cadb135b459b/typo3/sysext/backend/Classes/ViewHelpers/ModuleLayoutViewHelper.php#L79
  5. Oliver Klee voted on patch set 1 CR +1 05/11/21, 09:09

  6. Benjamin Franzke commented on patch set 1 CR +1 05/11/21, 11:03

    ShortcutButtonViewHelper.php:77 Reply

    Ack, this is ok, although it would be better to use dependency injection, we can't use it here as static view helpers unfortunately were not designed with DI in mind…
  7. Benjamin Franzke voted on patch set 1 V +1 05/11/21, 11:09

  8. Christian Kuhn voted on patch set 1 V +2 CR +2 05/11/21, 12:30

  9. Christian Kuhn merged patch set 2 05/11/21, 12:30