55041[BUGFIX] Make ImageService independent from object manager
Commit message
Review
-
Code review CR +2
- Stefan Neufeind +2
- Benni Mack +2
- Andreas Kienast +1
-
Verified V +2
- Stefan Neufeind +2
- Benni Mack +1
- TYPO3com +1 CI
Issues 2
Files 2
Review log 2840
Show 1215 earlier messages
-
Frans Saris uploaded patch set 1 12/12/17, 08:36
-
TYPO3com voted on patch set 1 V -1 12/12/17, 08:36 Completed build in 08s on Tue, 12 Dec, 09:36 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17623
-
Andreas Kienast uploaded patch set 2 12/12/17, 08:38
-
Andreas Kienast voted on patch set 2 CR +1 12/12/17, 08:39
-
Stefan Neufeind voted on patch set 2 CR +1 12/12/17, 08:39
-
Mathias Brodala commented on patch set 2 CR -1 12/12/17, 08:40
-
Stefan Neufeind commented on patch set 2 CR -1 12/12/17, 08:42
will take care of bringing back the "use" -
Stefan Neufeind uploaded patch set 3 12/12/17, 08:44
-
Stefan Neufeind voted on patch set 3 CR +1 12/12/17, 08:44
-
TYPO3com voted on patch set 2 V -1 12/12/17, 08:45 Completed build in 07m 09s on Tue, 12 Dec, 09:46 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17624
-
Wouter Wolters updated the commit message in patch set 4 12/12/17, 08:47
-
Wouter Wolters voted on patch set 4 CR +1 12/12/17, 08:48
-
Stefan Neufeind voted on patch set 4 CR +1 12/12/17, 08:49
-
TYPO3com voted on patch set 3 V -1 12/12/17, 08:51 Completed build in 07m 08s on Tue, 12 Dec, 09:51 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17625
-
Andreas Kienast commented on patch set 4 12/12/17, 08:52
MediaViewHelper.php:67Are you sure "use"d classes work with dependency injection?
-
TYPO3com voted on patch set 4 V -1 12/12/17, 08:57 Completed build in 09m 50s on Tue, 12 Dec, 09:57 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17626
-
Frans Saris commented on patch set 4 12/12/17, 09:03
You can verify this with the textmedia CE by adding a image thereMediaViewHelper.php:67Replyfor me it works :) I know @inject has issues with it. But I guess the `inject*` magic is different -
TYPO3com commented on patch set 4 12/12/17, 09:06 Completed build in 28m 25s on Tue, 12 Dec, 10:06 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17626
-
TYPO3com commented on patch set 4 12/12/17, 09:08 Completed build in 48m 41s on Tue, 12 Dec, 10:08 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17626
-
TYPO3com commented on patch set 4 12/12/17, 09:16 Completed build in 1h 17m 01s on Tue, 12 Dec, 10:16 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17626
-
Helmut Hummel commented on patch set 4 12/12/17, 09:18
MediaViewHelper.php:67Replyyes, it works with inject methods when using a type hint, because PHP reflection to get the class of the type hint -
Stefan Neufeind commented on patch set 4 CR -1 12/12/17, 09:20
Alex Opitz raised a good point: Could it be we can't use inject-methods here since then a fluid-viewhelper could only be used via Extbase? Only extbase calls those inject-helpers, right? -
Helmut Hummel commented on patch set 4 12/12/17, 09:31
> Could it be we can't use inject-methods yes, we can. see: \TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver::createViewHelperInstanceFromClassName all view helpers are always created with the objet manager -
Stefan Neufeind commented on patch set 4 CR +1 12/12/17, 09:33
okay, those inject-methods work ... and Helmut tought me why: \TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver::createViewHelperInstanceFromClassName Upon creating an instance Fluid uses an Extbase-objectmanager to create an instance -
Claus Due commented on patch set 4 12/12/17, 09:42
My two cents: Every time we use an injection method, we demand that the framework loads the ViewHelper class via ObjectManager. And every ViewHelper class that must be loaded by ObjectManager, is a ViewHelper class we cannot use outside of TYPO3. Even though in this case it is not likely that the ViewHelper will be used outside of TYPO3, it still adds one more ViewHelper to the pool of ViewHelpers which demand ObjectManager. The more we have of those, the harder it will be to some day avoid our ViewHelperResolver - which is solely responsible for loading ViewHelper classes because ObjectManager must be used. Also, injected properties cannot be referenced from static methods and static methods are the preferable way to render ViewHelpers (in this case, it is a TagBased ViewHelper and this part of the argument does not yet apply: they cannot yet be rendered statically). Therefore, I would personally avoid injection method in ViewHelpers at all costs, simply as a means to prepare us for the eventuality that some day, we might not be loading ViewHelper classes with ObjectManager. That is why I moved to a getter method in the previous patch. Whether or not you want to preserve that direction in the future is up to you. Just know that the less you use DI, the better your classes become in terms of compatibility. -
Andreas Kienast commented on patch set 4 12/12/17, 10:03
MediaViewHelper.php:67Reply UnresolvedCool, didn't know that. Thanks a lot :) -
TYPO3com commented on patch set 4 12/12/17, 10:11 Completed build in 2h 40m 18s on Tue, 12 Dec, 11:11 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17626
-
Benni Mack commented on patch set 4 CR -1 12/12/17, 10:17
I agree with Claus that ImageService sucks.it did not break for me as that stuff was initialized already (ImageService is a singleton) via Extbase before. So this is a nasty side-effect. Best solution would be to make ImageService injection-free as well. -
Frans Saris uploaded patch set 5 12/12/17, 10:46
-
TYPO3com voted on patch set 5 V -1 12/12/17, 10:53 Completed build in 07m 08s on Tue, 12 Dec, 11:53 AM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17632
-
Stefan Neufeind voted on patch set 5 CR +1 12/12/17, 11:01
-
TYPO3com commented on patch set 5 12/12/17, 12:45 Completed build in 2h 05m 55s on Tue, 12 Dec, 01:45 PM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17632
-
Christian Kuhn rebased onto patch set 6 12/12/17, 12:58
-
TYPO3com commented on patch set 5 12/12/17, 12:58 Completed build in 4h 18m 34s on Tue, 12 Dec, 01:58 PM Test Summary: 1 of 30140 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17632
-
TYPO3com voted on patch set 6 V +1 12/12/17, 13:04 Completed build in 06m 25s on Tue, 12 Dec, 02:04 PM Test Summary: 29979 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17651
-
Stefan Neufeind voted on patch set 6 CR +1 12/12/17, 13:14
-
Andreas Kienast voted on patch set 6 CR +1 12/12/17, 13:24
-
Benni Mack voted on patch set 6 V +1 CR +2 12/12/17, 14:15
-
Stefan Neufeind voted on patch set 6 V +2 CR +2 12/12/17, 14:22
-
Stefan Neufeind merged patch set 7 12/12/17, 14:22
MediaViewHelper.php:68