70831[TASK] Implement interface for ViewHelperResolverFactory
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Benjamin Franzke +1
- Benjamin Tammling +1
- Simon Praetorius +1
-
Verified V +2 Done
- Christian Kuhn +2
- Benjamin Franzke +1
- Benjamin Tammling +1
- Simon Praetorius +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Classes/DependencyInjection/ServiceProviderCompilationPass.php+3 −3
- typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextFactory.php+3 −3
- typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperResolverFactory.php+1 −1
- typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperResolverFactoryInterface.phpnew+29 −0
- typo3/sysext/fluid/Classes/ServiceProvider.php1+7 −1
Review log 1924
-
Benjamin Tammling uploaded patch set 1 08/31/21, 09:07
-
Benjamin Franzke commented on patch set 1 08/31/21, 09:15
Hey, how do you want to use this interface? The ViewHelperResolverFactory is injected statically in typo3/sysext/fluid/Classes/ServiceProvider.php (required because of installtool compatibility). So, what is the intended goal of your change? This factory is internal and may change after the ObjectManager removal in v12, therefore we would not like to add a public interface right now. -
Benjamin Franzke commented on patch set 1 08/31/21, 09:16
Reply
> The ViewHelperResolverFactory is injected statically in typo3/sysext/fluid/Classes/ServiceProvider.php (required because of installtool compatibility). Forgot to mention: …and that means that you cannot change the implementation via Services.yaml. -
core-ci voted on patch set 1 V +1 08/31/21, 09:21 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15915
-
Benjamin Tammling commented on patch set 1 08/31/21, 11:42
Reply
The overall goal is to extend the ViewHelperResolver. With this change we could use a ServiceProvider to return a custom factory which will then return our custom Resolver. -
Benjamin Franzke commented on patch set 1 08/31/21, 12:04
Reply
Ok, thanks for the clarification. Issue is: also service providers are internal and we can't provide ViewHelperResolverFactoryInterface as public api, if there is no public api to be able to provide an implementation. @Christian Kuhn: maybe we could just drop "final" from the class, so this internal(!) class could be overwritten by extending the class by using an internal(!) service provider – for users that *really* need that. I mean, we used "final" to stress that these objects are subjects to change and users would really likely run into "breaking" changes here… -
Benjamin Franzke commented on patch set 1 08/31/21, 12:20
Reply
Another option would be to introduce the interface as an internal implementation. So simply mark it: /** * @internal May change / vanish any time */ Then you can provide the implementation using internal API (service provider). -
Christian Kuhn commented on patch set 1 08/31/21, 12:23
Reply Unresolved
had a chat with benjamin franzke about this patch and we're fine in general when adding some internal comments. will outline details in a new patch set. i'll review and take care soon ... -
Christian Kuhn commented on patch set 1 CR -1 08/31/21, 12:34
-1 for now. will coordinate. -
Simon Praetorius voted on patch set 1 V +1 CR +1 09/01/21, 11:32
-
Christian Kuhn uploaded patch set 2 09/02/21, 08:23
-
Benjamin Franzke uploaded patch set 3 09/02/21, 08:46
-
core-ci voted on patch set 3 V +1 09/02/21, 09:06 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16057
-
Christian Kuhn uploaded patch set 4 09/02/21, 09:10
-
Benjamin Franzke uploaded patch set 5 09/02/21, 09:18
-
Benjamin Franzke voted on patch set 5 V +1 CR +1 09/02/21, 09:20
-
core-ci voted on patch set 4 V +1 09/02/21, 09:25 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16060
-
core-ci voted on patch set 5 V +1 09/02/21, 09:34 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16061
-
Christian Kuhn commented on patch set 5 V +1 CR +1 09/02/21, 09:34
ServiceProvider.php:39Unresolvednote we specify both factory and factoryInterface to make sure that only *one* instance is created if anyone injects ViewHelperResolverFactory directly. -
core-ci voted on patch set 2 V -1 09/02/21, 10:27 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16055
-
Simon Praetorius voted on patch set 5 V +1 CR +1 09/02/21, 13:22
-
Benjamin Tammling voted on patch set 5 V +1 CR +1 09/02/21, 13:27
-
Christian Kuhn voted on patch set 5 V +2 CR +2 09/02/21, 18:06
-
Christian Kuhn merged patch set 6 09/02/21, 18:06