Task #91237

Symfony DI (dependency injection) for ClassAliasMap(s)

Added by Christian Hackl 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Category:
-
Target version:
Start date:
2020-04-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Symfony DI (dependency injection) for ClassAliasMap(s)

For example dependency injection for "\TYPO3\CMS\Frontend\Page\PageRepository" via constructor didn't work.

// Classes/Controller/MyController.php

/**
 * pagesRepository
 *
 * @var \TYPO3\CMS\Frontend\Page\PageRepository
 */
protected $pageRepository = null;

public function __construct(\TYPO3\CMS\Frontend\Page\PageRepository $pageRepository) {
    $this->pageRepository = $pageRepository;
}
#1

Updated by Benjamin Franzke 7 months ago

  • Assignee set to Benjamin Franzke
#2

Updated by Benjamin Franzke 7 months ago

For reference, initial discussion was here: https://typo3.slack.com/archives/C0CRS7RFH/p1588169890380700

#3

Updated by Benni Mack 7 months ago

  • Target version set to next-patchlevel

Also available in: Atom PDF