Deprecation: #87550 - Use controller classes when registering plugins/modules¶
See Issue #87550
Configuring plugins and modules via the following methods has changed in two important ways.
Both methods expect you to provide the argument
configurePlugin also allows the argument
The first important change targets the
During the switch from underscore class names :php`Tx_Extbase_Foo_Bar` to actual namespaced classes
TYPO3\CMS\Extbase\Foo\Bar, a vendor
TYPO3\CMS has been introduced which had to be respected
during the configuration of plugins. To make that possible the argument
$extensionName has been
prepended with the vendor name, concatenated with dots.
- 'TYPO3.CMS.Form', // $extensionName 'Formframework', ['FormFrontend' => 'render, perform'], ['FormFrontend' => 'perform'], TYPO3CMSExtbaseUtilityExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
Setting the vendor name is now deprecated and must be omitted. Instead, the vendor name will be derived from the controller class namespace, which leads to the second important change.
$nonCacheableControllerActions used controller aliases as
array keys. The alias was the controller class name without the namespace and without the
suffix. There were a lot of conventions and a quite stupid custom autoloader mechanism before the introduction
of the composer autoloader, which made it necessary to put controllers in a specific directory and to name
the controller accordingly. As this is no longer the case, there is no need to guess the controller class name
any longer. Instead, the configuration/registration is now done with fully qualified controller class names.
- 'Form', 'Formframework', [TYPO3CMSFormControllerFormFrontendController::class => 'render, perform'], [TYPO3CMSFormControllerFormFrontendController::class => 'perform'], TYPO3CMSExtbaseUtilityExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
The following things are deprecated:
- Prepend the
$extensionNameargument with a vendor name.
- Using controller aliases as array keys in both arguments
Using the deprecated syntax will log deprecation warnings and will stop working in TYPO3 11.0.
All installations that use these methods:
- Omit the vendor name in argument
- Use fully qualified class names as array keys in arguments