FriendsOfTYPO3 / extension_builder

TYPO3 extension to kickstart and maintain TYPO3 extensions
https://docs.typo3.org/p/friendsoftypo3/extension-builder/11.0/en-us/
GNU General Public License v2.0
115 stars 79 forks source link

Deprecations: The TCA field 'CType' of table 'tt_content' uses the legacy way of defining 'items'. Please switch to associated array keys: label, value, icon, group, description. #743

Closed SSFGizmo closed 8 months ago

SSFGizmo commented 8 months ago

The TCA field 'CType' of table 'tt_content' uses the legacy way of defining 'items'. Please switch to associated array keys: label, value, icon, group, description.

OLD

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt

// Add content element to selector list
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    [
        '{plugin.name -> k:format.quoteString()}',
        '{extension.extensionKey}_{plugin.key}',
        '{extension.extensionKey}-plugin-{plugin.key}',
        '{extension.extensionKey}'
    ]
);

Perhaps it can help NEW

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt

// Add content element to selector list
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    [
        'label' => '{plugin.name -> k:format.quoteString()}',
        'value' => '{extension.extensionKey}_{plugin.key}',
        'icon'  => '{extension.extensionKey}-plugin-{plugin.key}',
        'group' => '{extension.extensionKey}'
    ]
);

TYPO3 Version v12.4

Extension Builder Version: v12.0.0-beta.2

SSFGizmo commented 8 months ago

The TCA field 'l10n_parent' of table 'xxx' uses the legacy way of defining 'items'. Please switch to associated array keys: label, value, icon, group, description.

OLD

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt

        'l10n_parent' => [
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectSingle',
                'default' => 0,
                'items' => [
                    ['', 0],

NEW

        'l10n_parent' => [
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectSingle',
                'default' => 0,
                'items' => [
                    ['label' => '', 'value' => 0],
SSFGizmo commented 8 months ago

OLD

/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt

        'starttime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
            'config' => [
                'type' => 'input',
                'renderType' => 'inputDateTime',
                'eval' => 'datetime,int',
                'default' => 0,
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],
        'endtime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
            'config' => [
                'type' => 'input',
                'renderType' => 'inputDateTime',
                'eval' => 'datetime,int',
                'default' => 0,
                'range' => [
                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
                ],
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],</f:if><f:if condition="{domainObject.categorizable}">

NEW

        'starttime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
            'config' => [
                'type' => 'datetime',
                'format' => 'datetime',
                'default' => 0,
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],
        'endtime' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
            'config' => [
                'type' => 'datetime',
                'format' => 'datetime',
                'default' => 0,
                'range' => [
                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
                ],
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ]
            ],
        ],</f:if><f:if condition="{domainObject.categorizable}">
SSFGizmo commented 8 months ago

OLD

Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt

        'hidden' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxToggle',
                'items' => [
                    [
                        0 => '',
                        1 => '',
                        'invertStateDisplay' => true
                    ]
                ],
            ],
        ],</f:if><f:if condition="{domainObject.addStarttimeEndtimeFields}">

NEW

  'hidden' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxToggle',
                'items' => [
                    [
                        'label' => '',
                        'invertStateDisplay' => true,
                    ],
                ],
            ],
        ],</f:if><f:if condition="{domainObject.addStarttimeEndtimeFields}">
PKuhlmay commented 8 months ago

Thank you very much. I will have a look at it.

PKuhlmay commented 8 months ago

fixed by #747

DavidBruchmann commented 8 months ago

Thanks for reporting!