86262[TASK] Move FluidViewAdapter to EXT:fluid
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
-
Verified V +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 14
- typo3/sysext/backend/Classes/View/BackendViewFactory.php+1 −1
- typo3/sysext/core/Classes/Mail/FluidEmail.php+1 −1
- typo3/sysext/core/Documentation/Changelog/13.3/Deprecation-101559-ExtbaseUsesExtcoreViewInterface.rst+2 −2
- typo3/sysext/core/Migrations/Code/ClassAliasMap.php+2 −0
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php+1 −1
- typo3/sysext/extbase/Classes/Mvc/View/GenericViewResolver.php+1 −1
- typo3/sysext/fluid/Classes/View/FluidViewAdapter.phprenamed+3 −1
- typo3/sysext/fluid/Classes/View/FluidViewFactory.php4renamed+7 −2
- typo3/sysext/fluid/Classes/ServiceProvider.php+1 −2
- typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php+1 −1
- typo3/sysext/form/Classes/Domain/Renderer/FluidFormRenderer.php+1 −1
- typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php+1 −1
- typo3/sysext/install/Classes/Controller/AbstractController.php+1 −1
- typo3/sysext/install/Classes/Controller/InstallerController.php+1 −1
Review log 2027
Show 12 earlier messages
-
Benjamin Franzke uploaded patch set 1 09/23/24, 08:45
-
core-ci voted on patch set 1 V +1 09/23/24, 08:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66426
-
Benjamin Franzke uploaded patch set 2
V +109/23/24, 09:18 -
core-ci voted on patch set 2 V +1 09/23/24, 09:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66427
-
Benjamin Franzke uploaded patch set 3
V +110/07/24, 08:33Resolve Merge-Conflict -
core-ci voted on patch set 3 V +1 10/07/24, 08:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67211
-
Christian Kuhn commented on patch set 3 10/11/24, 09:25
FluidViewFactory.php:36is this still a good idea? this means the alias will be registered as soon as the package exists. what happens when a second packages does this too? does it throw, or what is the precedence then? with the class being within ext:core, that question was not very important, but is of interest when moved to a different package. -
Stefan Bürk uploaded patch set 4
V +110/11/24, 17:40 -
Stefan Bürk commented on patch set 3 10/11/24, 17:41
FluidViewFactory.php:36ReplyThat's a question of ordering. If the ext:fluid is loaded, the other extension wants to replace the default implementation it must have "fluid" as require or as suggest (composer.json) or depend/suggest in ext_emconf.php (legacy mode). ``` #[AsAlias(ViewFactoryInterface::class, public: true)] class CustomFluidViewFactory implements ViewFactoryInterface {} ``` That worked already when this was in EXT:core and with this change also. Could also be done within a Services.php checking if a service has already been registered, and decide to add the costum on eiter as "default" alias or as decorating one - not aware how to make that conditional with phpattributes (existing). A decorating view factory of the interface would reciev the prior service as part of the constructor, so it can be used to make a fallback to the original one. ``` #[AsDecorator(decorates: ViewFactoryInterface::class, priority: 10, onInvalid: ContainerInterface::NULL_ON_INVALID_REFERENCE)] class CustomFluidViewFactory implements ViewFactoryInterface { public function __construct( private RenderingContextFactory $renderingContextFactory, private ?ViewFactoryInterface $previousViewFactory = null, ) {} public function create(ViewFactoryData $data): ViewInterface { $useDefaultFactory = false; //$useDefaultFactory = true; if ($useDefaultFactory) { if ($this->previousViewFactory === null) { throw new \RuntimeException('no decoracted prior service', 1728668089); } return $this->previousViewFactory->create($data); } $pathTuple = []; if (!empty($data->templateRootPaths)) { $pathTuple['templateRootPaths'] = $data->templateRootPaths; } if (!empty($data->layoutRootPaths)) { $pathTuple['layoutRootPaths'] = $data->layoutRootPaths; } if (!empty($data->partialRootPaths)) { $pathTuple['partialRootPaths'] = $data->partialRootPaths; } $renderingContext = $this->renderingContextFactory->create($pathTuple, $data->request); if ($data->templatePathAndFilename) { $renderingContext->getTemplatePaths()->setTemplatePathAndFilename($data->templatePathAndFilename); } if ($data->format) { // @todo: We may want to hand this over to RenderingContextFactory // and set up TemplatePaths() with the format correctly already? $renderingContext->getTemplatePaths()->setFormat($data->format); } $view = new TemplateView($renderingContext); return new FluidViewAdapter($view); } } ``` -
Stefan Bürk commented on patch set 4 10/11/24, 17:44
FluidViewFactory.php:36ReplyThere is also a `#[AutowireDecorated()]` attribute to define in the constructor where the previous service should be added. And the AsDecorator has also multiple ways, not going into detail here. Just answering it will work. -
core-ci voted on patch set 4 V +1 10/11/24, 17:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67613
-
Christian Kuhn commented on patch set 4 10/12/24, 08:07
FluidViewFactory.php:36ReplyDone -
Stefan Bürk commented on patch set 4 10/14/24, 04:42
Not sure about the ReST file move .. guess needs at least a redirect in the changelog .... -
Stefan Bürk uploaded patch set 5
V +110/14/24, 04:42 -
Stefan Bürk uploaded patch set 6 10/14/24, 04:43
-
Stefan Bürk commented on patch set 5 10/14/24, 04:44
Reply
Done -
core-ci voted on patch set 6 V +1 10/14/24, 04:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67731
-
core-ci voted on patch set 5 V +1 10/14/24, 04:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67729
-
Benni Mack voted on patch set 6 CR +1 V +1 10/14/24, 06:27
-
Stefan Bürk voted on patch set 6 CR +1 V +1 10/14/24, 07:28
-
Christian Kuhn commented on patch set 6 CR -1 10/14/24, 08:56
composer.json:152this line is duplicated now. -
Benni Mack uploaded patch set 7
CR +1V +110/14/24, 09:23 -
Benni Mack commented on patch set 7 10/14/24, 09:24
composer.json:152ReplyDone -
core-ci voted on patch set 7 V +1 10/14/24, 09:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67746
-
Christian Kuhn voted on patch set 7 CR +1 V +1 10/14/24, 14:14
-
Stefan Bürk voted on patch set 7 CR +2 V +2 10/14/24, 14:14
-
Stefan Bürk merged patch set 8 10/14/24, 14:14