Skip to content
Snippets Groups Projects
Commit fe59c7c6 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[BUGFIX] Avoid ancient injectSettings() handling

There is some ancient when a DI method is called
'injectSettings': DI ignores this.

There is a single use for Fluid views in extbase,
which calls injectSettings if it exists manually.
However no Fluid view ever implemented this method.
It is removed.

Also, the DI magic to not call 'injectSettings'
is removed, injectSettings can now be used as
casual inject* method. This is considered a
bugfix (for main only): It is unexpected and
undocumented this handling exists.

Resolves: #104445
Releases: main
Change-Id: I6eb527bea048dd856f618b4caadb7e17d4ce6ad3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85317


Reviewed-by: default avatarSimon Praetorius <simon@praetorius.me>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarSimon Praetorius <simon@praetorius.me>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 21d3f18b
Branches
Tags
No related merge requests found
......@@ -57,10 +57,6 @@ class AutowireInjectMethodsPass extends AbstractRecursivePass
}
if ($reflectionMethod->isPublic() && str_starts_with($reflectionMethod->name, 'inject')) {
if ($reflectionMethod->name === 'injectSettings') {
continue;
}
$value->addMethodCall($reflectionMethod->name);
}
......
......@@ -493,9 +493,6 @@ abstract class ActionController implements ControllerInterface
$templatePaths->fillDefaultsByPackageName($this->request->getControllerExtensionKey());
$templatePaths->setFormat($this->request->getFormat());
}
if (method_exists($view, 'injectSettings')) {
$view->injectSettings($this->settings);
}
$view->assign('settings', $this->settings);
return $view;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment