Bug #99172
closedDI for StandaloneView
100%
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
Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78149
Updated by Stefan Froemken about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 46d78c772102b4085cd8bc004b33d3023409bc55.