[TASK] Make DependencyInjectionTrait compatible to TYPO3 >= 10

This commit is contained in:
Philipp Dieter 2021-12-15 17:04:20 +01:00
parent 97c3407636
commit f62695055f

View File

@ -111,6 +111,11 @@ trait DependencyInjectionTrait
get_class($this) get_class($this)
); );
foreach ($classInfo->getInjectMethods() as $method => $className) { foreach ($classInfo->getInjectMethods() as $method => $className) {
if (version_compare(TYPO3_branch, '10.0', '>=')) {
$className = $className
->getFirstParameter()
->getDependency();
}
$class = $this->objectManager->get( $class = $this->objectManager->get(
$className $className
); );