Project

General

Profile

Actions

Bug #99172

closed

DI for StandaloneView

Added by Stefan Froemken over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
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 #1

Updated by Benni Mack over 1 year ago

  • Target version changed from 12.1 to 12.2
Actions #2

Updated by Benni Mack about 1 year ago

  • Target version changed from 12.2 to 12.3
Actions #3

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

Actions #4

Updated by Stefan Froemken about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF