refactor: apply TYPO3 13 Rector and Fractor migrations

Automated migrations from rector.php and fractor.php (TCA, Extbase
controllers and annotations, ViewHelpers, QueryBuilder, FlexForms,
TypoScript conditions).

Plugins stay list_type plugins: Rector switched them to content
element types, which needs a tt_content migration. That is deferred to
the TYPO3 14 step, where list_type is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-21 14:14:38 +02:00
1 parent 1b958a6084
commit 41b9302d9b
119 files changed
+2211 -2581

No files matched your search

@@ -1,6 +1,8 @@
<?php
defined('TYPO3_MODE') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
call_user_func(function() {
@@ -29,7 +31,7 @@ call_user_func(function() {
'foreign_table' => 'tx_epproducts_domain_model_country',
'foreign_table_where' => 'ORDER BY name',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'minitems' => 0,
'maxitems' => 1,
@@ -45,7 +47,7 @@ call_user_func(function() {
'foreign_table' => 'tx_epproducts_domain_model_region',
'foreign_table_where' => 'ORDER BY name',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'minitems' => 0,
'maxitems' => 1,
@@ -113,7 +115,7 @@ call_user_func(function() {
'foreign_table' => 'tx_epproducts_domain_model_badge',
'foreign_table_where' => 'ORDER BY title',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'minitems' => 0,
'maxitems' => 1,
@@ -121,12 +123,12 @@ call_user_func(function() {
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
ExtensionManagementUtility::addTCAcolumns(
'pages',
$temporaryColumns
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
ExtensionManagementUtility::addToAllTCAtypes(
'pages',
'--div--;Kontext,
tx_eptheme_context_pacode,tx_eptheme_context_country,tx_eptheme_context_region,
@@ -138,7 +140,7 @@ call_user_func(function() {
'1,4'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
ExtensionManagementUtility::registerPageTSConfigFile(
'ep_theme',
'Configuration/TSconfig/Page/Main.tsconfig',
'EP Theme'
@@ -1,5 +1,7 @@
<?php
if (!defined('TYPO3_MODE')) die ('Access denied.');
use TYPO3\CMS\Core\Utility\ArrayUtility;
if (!defined('TYPO3')) die ('Access denied.');
$tca = [
'ctrl' => [
@@ -7,4 +9,4 @@ $tca = [
],
];
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file'], $tca);
ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file'], $tca);
@@ -1,10 +1,12 @@
<?php
defined('TYPO3_MODE') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
ExtensionManagementUtility::addStaticFile(
'ep_theme',
'Configuration/TypoScript',
'EP Theme'
@@ -1,6 +1,8 @@
<?php
defined('TYPO3_MODE') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
call_user_func(function () {
@@ -12,7 +14,8 @@ call_user_func(function () {
'type' => 'input',
'default' => 'Details',
'size' => 30,
'eval' => 'trim,required'
'eval' => 'trim',
'required' => true
],
],
'tx_eptheme_context_country' => [
@@ -24,7 +27,7 @@ call_user_func(function () {
'foreign_table' => 'tx_epproducts_domain_model_country',
'foreign_table_where' => 'ORDER BY name ASC',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'default' => 0,
'minitems' => 0,
@@ -40,7 +43,7 @@ call_user_func(function () {
'foreign_table' => 'tx_epproducts_domain_model_region',
'foreign_table_where' => 'ORDER BY name ASC',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'default' => 0,
'minitems' => 0,
@@ -56,7 +59,7 @@ call_user_func(function () {
'foreign_table' => 'tx_epproducts_domain_model_city',
'foreign_table_where' => 'ORDER BY name ASC',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'default' => 0,
'minitems' => 0,
@@ -72,7 +75,7 @@ call_user_func(function () {
'foreign_table' => 'tx_epproducts_domain_model_hotel',
'foreign_table_where' => 'ORDER BY name ASC',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'default' => 0,
'minitems' => 0,
@@ -88,7 +91,7 @@ call_user_func(function () {
'foreign_table' => 'tx_epproducts_domain_model_concept',
'foreign_table_where' => 'ORDER BY name ASC',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'default' => 0,
'minitems' => 0,
@@ -104,7 +107,7 @@ call_user_func(function () {
'foreign_table' => 'tx_epproducts_domain_model_product',
'foreign_table_where' => 'ORDER BY name_internal, name ASC',
'items' => [
['Keine Zuordnung', 0],
['label' => 'Keine Zuordnung', 'value' => 0],
],
'default' => 0,
'minitems' => 0,
@@ -115,20 +118,18 @@ call_user_func(function () {
'exclude' => 0,
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_context.date_from',
'config' => [
'type' => 'input',
'type' => 'datetime',
'size' => 12,
'eval' => 'date,int',
'renderType' => 'inputDateTime',
'format' => 'date',
]
],
'tx_eptheme_context_date_to' => [
'exclude' => 0,
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_context.date_to',
'config' => [
'type' => 'input',
'type' => 'datetime',
'size' => 12,
'eval' => 'date,int',
'renderType' => 'inputDateTime',
'format' => 'date',
]
],
'tx_eptheme_background' => [
@@ -139,18 +140,18 @@ call_user_func(function () {
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
[ 'ohne', 0 ],
[ 'oben', 1 ],
[ 'unten', 2 ],
[ 'oben und unten', 3 ],
[ 'label' => 'ohne', 'value' => 0 ],
[ 'label' => 'oben', 'value' => 1 ],
[ 'label' => 'unten', 'value' => 2 ],
[ 'label' => 'oben und unten', 'value' => 3 ],
],
],
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $ttContentColumns);
ExtensionManagementUtility::addTCAcolumns('tt_content', $ttContentColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
ExtensionManagementUtility::addFieldsToPalette(
'tt_content',
'header',
'--linebreak--,
@@ -1,23 +1,25 @@
<?php
defined('TYPO3_MODE') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
call_user_func(function() {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Button',
'button',
'content-image'
'label' => 'Button',
'value' => 'button',
'icon' => 'content-image'
],
'ytvideo',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
ExtensionManagementUtility::addFieldsToPalette(
'tt_content',
'tx_eptheme_button',
'header,header_link'
@@ -1,8 +1,12 @@
<?php
use TYPO3\CMS\Core\Utility\GeneralUtility;
use B13\Container\Tca\Registry;
use B13\Container\Tca\ContainerConfiguration;
call_user_func(function () {
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
new \B13\Container\Tca\ContainerConfiguration(
GeneralUtility::makeInstance(Registry::class)->configureContainer(
new ContainerConfiguration(
'ep_container_quarters',
'Vierspalter',
'25/25/25/25 Aufteilung mit groß/klein Umschaltung',
@@ -14,8 +18,8 @@ call_user_func(function () {
)
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
new \B13\Container\Tca\ContainerConfiguration(
GeneralUtility::makeInstance(Registry::class)->configureContainer(
new ContainerConfiguration(
'ep_container_teasergroup',
'Dreispalter',
'33/33/33 Aufteilung mit groß/klein Umschaltung',
@@ -1,101 +1,103 @@
<?php
defined('TYPO3_MODE') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
call_user_func(function() {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser allgemein',
'teaser',
'content-image'
'label' => 'Teaser allgemein',
'value' => 'teaser',
'icon' => 'content-image'
],
'textmedia',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Land',
'teaser_country',
'content-image'
'label' => 'Teaser Land',
'value' => 'teaser_country',
'icon' => 'content-image'
],
'teaser',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Gebiet',
'teaser_region',
'content-image'
'label' => 'Teaser Gebiet',
'value' => 'teaser_region',
'icon' => 'content-image'
],
'teaser_country',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Ort',
'teaser_city',
'content-image'
'label' => 'Teaser Ort',
'value' => 'teaser_city',
'icon' => 'content-image'
],
'teaser_region',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Hotel',
'teaser_hotel',
'content-image'
'label' => 'Teaser Hotel',
'value' => 'teaser_hotel',
'icon' => 'content-image'
],
'teaser_city',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Konzept',
'teaser_concept',
'content-image'
'label' => 'Teaser Konzept',
'value' => 'teaser_concept',
'icon' => 'content-image'
],
'teaser_hotel',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Produkt',
'teaser_product',
'content-image'
'label' => 'Teaser Produkt',
'value' => 'teaser_product',
'icon' => 'content-image'
],
'teaser_concept',
'after'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teaser Buchungslink',
'teaser_booking_link',
'content-image'
'label' => 'Teaser Buchungslink',
'value' => 'teaser_booking_link',
'icon' => 'content-image'
],
'teaser_concept',
'after'
@@ -130,7 +132,11 @@ call_user_func(function() {
],
'assets' => [
'label' => 'Teaserbild',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', [
'config' => [
// TODO: Important! Verify that the fieldname value in foreign table either matches the column name
// or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields
'type' => 'file',
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'],
'appearance' => [
'createNewRelationLinkTitle' => 'Hinzufügen'
],
@@ -163,7 +169,7 @@ call_user_func(function() {
],
'maxitems' => 1,
'minitems' => 0,
], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
]
]
]
];
@@ -0,0 +1,3 @@
<?php
$GLOBALS['TCA']['tx_eptheme_domain_model_badge']['ctrl']['security']['ignorePageTypeRestriction'] = true;
@@ -0,0 +1,3 @@
<?php
$GLOBALS['TCA']['tx_eptheme_domain_model_slide']['ctrl']['security']['ignorePageTypeRestriction'] = true;