Deprecation: #109438 - ext_tables.php in extensions
See forge#109438
Description
Extensions that still ship an ext_ file will now trigger
a PHP
E_ error each time the file is loaded during
a non-cached request or cache warm-up.
The ext_ file was historically used to register backend
modules, page doktypes, user settings, and other runtime configuration.
All of these use cases now have dedicated alternatives in modern TYPO3:
- Backend modules:
Configuration/Backend/ Modules. php - Backend routes:
Configuration/Backend/ Routes. php - User settings:
Configuration/(see forge#108843)TCA/ Overrides/ be_ users. php - Page doktype allowed record types:
Configuration/(see forge#108557)TCA/ Overrides/ pages. php
Impact
A PHP
E_ error is triggered for every third-party
extension that still provides an ext_ file whenever
ext_ files are loaded without caching, for example during
cache warm-up or in development context.
Support for ext_ will be removed in TYPO3 v15.0.
Affected installations
All installations using third-party extensions that still ship an
ext_ file are affected.
Migration
Move all registrations from ext_ to the appropriate
configuration files.
User settings
User settings previously registered via
Extension in
ext_ should now be added via
Extension in
Configuration/.
Before:
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['myCustomSetting'] = [
'type' => 'check',
'label' => 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf:myCustomSetting',
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToUserSettings(
'myCustomSetting',
'after:emailMeAtLogin'
);
After:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserSetting(
'myCustomSetting',
[
'label' => 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf:myCustomSetting',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
],
],
'after:emailMeAtLogin'
);
Page doktype allowed record types
Page doktypes previously registered via
Page in
ext_ should now use the TCA option
allowed in Configuration/.
Before:
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry::class
)->add(116, [
'allowedTables' => ['tt_content', 'my_custom_record'],
]);
After:
$GLOBALS['TCA']['pages']['types']['116']['allowedRecordTypes'] = [
'tt_content',
'my_custom_record',
];
Once all registrations have been moved, the ext_ file
can be removed from the extension.