69100[TASK] Avoid ObjectManager->get() in EXT:backend
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
-
Oli Bartsch uploaded patch set 1 05/10/21, 19:35
-
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
-
Benni Mack commented on patch set 1 05/10/21, 21:32
-
Oli Bartsch commented on patch set 1 05/11/21, 08:07
ShortcutButtonViewHelper.php:77ReplyI'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 -
Oliver Klee voted on patch set 1 CR +1 05/11/21, 09:09
-
Benjamin Franzke commented on patch set 1 CR +1 05/11/21, 11:03
ShortcutButtonViewHelper.php:77ReplyAck, 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… -
Benjamin Franzke voted on patch set 1 V +1 05/11/21, 11:09
-
Christian Kuhn voted on patch set 1 V +2 CR +2 05/11/21, 12:30
-
Christian Kuhn merged patch set 2 05/11/21, 12:30
ShortcutButtonViewHelper.php:77