Actions
Bug #99172
closedDI for StandaloneView
Start date:
2022-11-23
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
Hello,
with TYPO3 12 the constructor argument of StandaloneView was removed.
Further the ViewInterface implementation was removed from StandaloneView.
Please remember these lines in TYPO3 11, which sets StandaloneView to "shared: false":
// @deprecated since v11, will be removed with v12. Drop together with extbase ViewInterface, set JsonView and StandaloneView public. foreach ($container->findTaggedServiceIds('extbase.view') as $id => $tags) { $container->findDefinition($id)->setShared(false)->setPublic(true); }
This results in following problem:
If you inject StandaloneView via Constructor Injection to multiple classes, all classes will inject the same StandaloneView.
Please set Standalone back to "shared: false" or keep a note that StandaloneView has to be loaded by GeneralUtility::makeInstance
Stefan
Actions