Actions
Task #91237
closedSymfony DI (dependency injection) for ClassAliasMap(s)
Status:
Rejected
Priority:
Should have
Assignee:
Category:
System/Bootstrap/Configuration
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; }
Updated by Benjamin Franzke over 4 years ago
For reference, initial discussion was here: https://typo3.slack.com/archives/C0CRS7RFH/p1588169890380700
Updated by Garvin Hicking 4 months ago
- Category set to System/Bootstrap/Configuration
Updated by Garvin Hicking 2 months ago
- Status changed from New to Needs Feedback
Is this something that still needs addressing, or can we close it?
Updated by Benjamin Franzke about 2 months ago
- Status changed from Needs Feedback to Rejected
There is no "proper" way to solve this generally, sorry.
We need to add define (deprecated) service aliases when moving public API in new cases like these.
An example for that is the following change:
75994: [BUGFIX] Add alias for moved RecordLinkHandler service | https://review.typo3.org/c/Packages/TYPO3.CMS/+/75994
That means this is sth. we need to generally take care of in reviews.
Actions