[TASK] Use ext:core ViewInterface in extbase
TYPO3 v12 added a new ViewInterface to ext:core that allows implementing *any* view as long as it sticks to this interface. This interface has been put into use for all backend modules, combined with a factory that allows to set custom stuff per module. Extbase however has not been touched: Extbase is still tailored towards ext:fluid and Fluid standalone. The patch changes this by adapting the Extbase related views towards ext:core ViewInterface. This allows implementing "own" views not depending on Fluid standalone. The patch has to hop through quite some loops to allow this: ext:core FluidViewAdapter is a class implemented in v12 that is a facade between core views and Fluid. Unfortunatly, extbase uses some "specialities" like "renderPartial()" from Fluid, which ext:core ViewInterface does not implement. We can not get rid of those within extbase any time soon. As such, FluidViewAdapter now implements all the nasty details that Fluid provides: FluidViewAdapter is now the main class between extbase and Fluid views - it implements both the Fluid view interface, plus ext:core ViewInterface. FluidViewAdapter in itself is rather simple: It only holds the Fluid view instance. Historically, many further operations were possible on Fluid view classes, those were only wrappers around RenderingContext, though. To keep backwards compatibility, FluidViewAdapter now re-implements all these methods, but deprecates them. In addition to ext:core ViewInterface, FluidViewAdapter will continue to implement getRenderingContext(), setRenderingContext() (probably), renderSection() and renderPartial(). All other methods that are wrappers around details of RenderingContext are marked @deprecatded. Systems that need to work with details of Fluid, now need to test for an instance of FluidViewAdapter to manipulate setRenderingContext if needed. This strategy will allow us to phase out ext:fluid StandaloneView and ext:fluid TemplateView with further patches, which will further simplify the layer towards Fluid standalone. Within Extabse, the main view interface is now ext:core ViewInterface, which free's the dependency to Fluid. JsonView is now the primary example for a view that has no relation to Fluid anymore. TYPO3 v14 can continue with hardening various type hints related to views, those have been marked accordingly. Note the handling related to ServerRequestInterface will see some additional patches in this area as well. Resolves: #101559 Related: #96730 Related: #104463 Releases: main Change-Id: I4be3e6be191b8bce599523a1055fc6136a86a879 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80329 Tested-by:Simon Praetorius <simon@praetorius.me> Reviewed-by:
Simon Praetorius <simon@praetorius.me> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Hannes Lau <office@hanneslau.de> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 15 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Classes/View/FluidViewAdapter.php 225 additions, 4 deletionstypo3/sysext/core/Classes/View/FluidViewAdapter.php
- typo3/sysext/core/Documentation/Changelog/13.3/Deprecation-101559-ExtbaseUsesExtcoreViewInterface.rst 62 additions, 0 deletions....3/Deprecation-101559-ExtbaseUsesExtcoreViewInterface.rst
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php 26 additions, 27 deletions...ysext/extbase/Classes/Mvc/Controller/ActionController.php
- typo3/sysext/extbase/Classes/Mvc/View/GenericViewResolver.php 9 additions, 2 deletions...3/sysext/extbase/Classes/Mvc/View/GenericViewResolver.php
- typo3/sysext/extbase/Classes/Mvc/View/JsonView.php 19 additions, 6 deletionstypo3/sysext/extbase/Classes/Mvc/View/JsonView.php
- typo3/sysext/extbase/Classes/Mvc/View/ViewResolverInterface.php 1 addition, 1 deletion...sysext/extbase/Classes/Mvc/View/ViewResolverInterface.php
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Controller/ContentController.php 5 additions, 3 deletions...ons/blog_example/Classes/Controller/ContentController.php
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/ActionControllerTest.php 16 additions, 6 deletions.../Tests/Functional/Mvc/Controller/ActionControllerTest.php
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/Fixture/Extension/action_controller_test/Classes/Controller/TestController.php 3 additions, 2 deletions...ion_controller_test/Classes/Controller/TestController.php
- typo3/sysext/felogin/Classes/Event/AbstractConfirmedEvent.php 4 additions, 2 deletions...3/sysext/felogin/Classes/Event/AbstractConfirmedEvent.php
- typo3/sysext/felogin/Classes/Event/ModifyLoginFormViewEvent.php 8 additions, 3 deletions...sysext/felogin/Classes/Event/ModifyLoginFormViewEvent.php
- typo3/sysext/form/Classes/Controller/FormEditorController.php 4 additions, 2 deletions...3/sysext/form/Classes/Controller/FormEditorController.php
- typo3/sysext/form/Classes/Controller/FormManagerController.php 13 additions, 7 deletions.../sysext/form/Classes/Controller/FormManagerController.php
Please register or sign in to comment