From 393d38b0de6444d02ed4f130318308969fe08976 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Dec 2024 14:14:53 +0100 Subject: [PATCH 01/21] Fix deprecation notice for sys_language_uid > The TCA field 'sys_language_uid' of table 'tx_cetimeline_domain_model_entry' is defined > as the 'languageField' and should therefore use the TCA type 'language' > instead of TCA type 'select' with 'foreign_table=sys_language' or 'special=languages' https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.2/Feature-57082-NewTCATypeLanguage.html --- .../TCA/tx_cetimeline_domain_model_entry.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index 1ca9f14..bc3eddd 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -48,17 +48,7 @@ 'exclude' => true, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'special' => 'languages', - 'items' => [ - [ - 'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', - -1, - 'flags-multiple' - ] - ], - 'default' => 0, + 'type' => 'language', ], ], 'l10n_parent' => [ From 61f10aef62dcffb249bebc09fad81e9d0858418a Mon Sep 17 00:00:00 2001 From: vnc-stel <141130522+vnc-stel@users.noreply.github.com> Date: Fri, 24 Nov 2023 14:15:43 +0100 Subject: [PATCH 02/21] Fix TYPO3 v11 support in composer.json * change typo3 version to 11.5 Taken from https://github.com/fullstackfreelancer/ce_timeline/pull/1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 628a041..a3e76b6 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ }, "license": "GPL-3.0-or-later", "require": { - "typo3/cms-core": "^11.8 || ^12.0" + "typo3/cms-core": "^11.5 || ^12.0" }, "keywords": [ "TYPO3", From cda8c6efd04a2bb1203767c0968afb58855ca090 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Dec 2024 14:19:03 +0100 Subject: [PATCH 03/21] Fix TYPO3 v11 support in ext_emconf.php Related: https://github.com/fullstackfreelancer/ce_timeline/pull/1 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 0350892..e3726f8 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -13,7 +13,7 @@ 'constraints' => array ( 'depends' => array ( - 'typo3' => '11.8.99-12.4.99' + 'typo3' => '11.5.0-12.4.99' ), 'conflicts' => array ( From a2fae131d367cbe813b7b95dee8463d31514f10c Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Dec 2024 14:21:00 +0100 Subject: [PATCH 04/21] Re-add "replaces" for old extension name The following commit changed the package name: > Udpate composer vendor name from "simonkoehler" to "fullstackfreelancer" composer.json now declares that the new name replaces the old one. --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index a3e76b6..55e20cc 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,9 @@ "chronologisch", "chronologic" ], + "replace": { + "simonkoehler/ce-timeline": "self.version" + }, "extra": { "typo3/cms": { "extension-key": "ce_timeline" From ea2a90b93067b36850af43644080c6a90a22e00c Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Dec 2024 14:23:59 +0100 Subject: [PATCH 05/21] Remove hard-coded version number from composer.json We use tags --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 55e20cc..eeaa31e 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,6 @@ { "name": "fullstackfreelancer/ce-timeline", "type": "typo3-cms-extension", - "version": "4.0.2", "description": "Enables a new content element of type Timeline", "homepage": "https://simonkoehler.com", "authors": [ From 9941d1f55268c2949a894663fc68bdbd76a37fab Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Dec 2024 14:42:32 +0100 Subject: [PATCH 06/21] Fix deprecation notice for l10n_parent > The 'tx_cetimeline_domain_model_entry' TCA tables transOrigPointerField > 'l10n_parent' is defined as excluded field > which is no longer needed and should therefore be removed. https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/10.3/Important-89672-TransOrigPointerFieldIsNotLongerAllowedToBeExcluded.html --- Configuration/TCA/tx_cetimeline_domain_model_entry.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index bc3eddd..a0532d2 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -53,7 +53,6 @@ ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => true, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', From 962ac07f336e572909f987bdda9b3e5ccb0999f5 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 Dec 2024 14:45:50 +0100 Subject: [PATCH 07/21] Fix deprecation: showRecordFieldList not needed anymore > The 'tx_cetimeline_domain_model_entry' TCA configuration 'showRecordFieldList' > inside the section 'interface' is not evaluated anymore and should therefore be removed. https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/10.3/Feature-88901-RenderAllFieldsInElementInformationController.html --- Configuration/TCA/tx_cetimeline_domain_model_entry.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index a0532d2..55cee20 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -23,9 +23,6 @@ ], 'iconfile' => 'EXT:ce_timeline/Resources/Public/Icons/content-timeline-record.svg', ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, header, header_layout, description, description_html, position, typeof, media, starttime, endtime', - ], 'types' => [ '1' => ['showitem' => 'l10n_parent, l10n_diffsource, --palette--;;settings, --palette--;;titles, description, description_html, --div--;Galerie, --palette--;;dimensions,--palette--;;lightbox, --div--;Access, starttime, endtime'], ], From fbdd818b5b805b815c59b7cf3ef1ccd60049d89f Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 3 Feb 2025 15:01:43 +0100 Subject: [PATCH 08/21] Rector config for TYPO3v12 --- rector.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 rector.php diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..940d5d3 --- /dev/null +++ b/rector.php @@ -0,0 +1,54 @@ +withPaths( + [ + getcwd() + ] + ) + // uncomment to reach your current PHP version + ->withPhpSets(php80: true) + ->withPhpVersion(PhpVersion::PHP_83) + ->withSets([ + Typo3SetList::CODE_QUALITY, + Typo3SetList::GENERAL, + Typo3LevelSetList::UP_TO_TYPO3_12, + ]) + # To have a better analysis from PHPStan, we teach it here some more things + ->withPHPStanConfigs([ + Typo3Option::PHPSTAN_FOR_RECTOR_PATH + ]) + ->withRules([ + AddVoidReturnTypeWhereNoReturnRector::class, + ConvertImplicitVariablesToExplicitGlobalsRector::class, + ]) + ->withConfiguredRule(ExtEmConfRector::class, [ + ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.3.0-8.4.99', + ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '11.5.0-12.4.99', + ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [] + ]) + ->withImportNames(importNames: false, importDocBlockNames: false, importShortClasses: false, removeUnusedImports: true) + # If you use withImportNames(), you should consider excluding some TYPO3 files. + ->withSkip([ + // @see https://github.com/sabbelasichon/typo3-rector/issues/2536 + __DIR__ . '/**/Configuration/ExtensionBuilder/*', + NameImportingPostRector::class => [ + 'ext_localconf.php', // This line can be removed since TYPO3 11.4, see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Important-94280-MoveContentsOfExtPhpIntoLocalScopes.html + 'ext_tables.php', // This line can be removed since TYPO3 11.4, see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Important-94280-MoveContentsOfExtPhpIntoLocalScopes.html + 'ClassAliasMap.php', + ], + \Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class, + ]) +; From c891f8ef62a9f1ae8ed1d1080e5becf5c8d979c7 Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:05:13 +0100 Subject: [PATCH 09/21] Convert long array() to short [] Applied rule: Rector\Php54\Rector\Array_\LongArrayToShortArrayRector --- Classes/Domain/Repository/EntryRepository.php | 5 ----- .../TCA/Overrides/tt_content_ce_timeline.php | 8 ++++---- ext_emconf.php | 20 +++++++++---------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/Classes/Domain/Repository/EntryRepository.php b/Classes/Domain/Repository/EntryRepository.php index 7d7c6d1..0c90a84 100644 --- a/Classes/Domain/Repository/EntryRepository.php +++ b/Classes/Domain/Repository/EntryRepository.php @@ -1,10 +1,5 @@ 'header, header_layout, header_position, --linebreak--, bodytext','canNotCollapse' => 1 - ); + ]; // New palette main - $GLOBALS['TCA']['tt_content']['palettes']['main'] = array( + $GLOBALS['TCA']['tt_content']['palettes']['main'] = [ 'showitem' => 'timeline_entries, --palette--;;textfields','canNotCollapse' => 1 - ); + ]; $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['ce_timeline'] = 'ce-timeline-icon'; $GLOBALS['TCA']['tt_content']['types']['ce_timeline'] = [ diff --git a/ext_emconf.php b/ext_emconf.php index e3726f8..3c355bf 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,5 +1,5 @@ 'Timeline Content Element', 'description' => 'Add a new content element of type "Timeline" for displaying histories of companies and more...', 'category' => 'fe', @@ -11,15 +11,15 @@ 'clearCacheOnLoad' => 0, 'version' => '4.0.2', 'constraints' => - array ( - 'depends' => array ( + [ + 'depends' => [ 'typo3' => '11.5.0-12.4.99' - ), - 'conflicts' => array ( + ], + 'conflicts' => [ - ), - 'suggests' => array ( + ], + 'suggests' => [ - ), - ) -); + ], + ] +]; From 8b48fcd93817945d3fc0a089d477b275cf592fa3 Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:05:42 +0100 Subject: [PATCH 10/21] Add "void" return type to functions without return values Applied rule: Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector --- Classes/Domain/Model/Entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Entry.php b/Classes/Domain/Model/Entry.php index 98221fd..4aabd71 100644 --- a/Classes/Domain/Model/Entry.php +++ b/Classes/Domain/Model/Entry.php @@ -47,7 +47,7 @@ public function getTypeof() * @param int $typeof * @return void */ - public function setTypeof($typeof) + public function setTypeof($typeof): void { $this->typeof = $typeof; } From 52ad673a6734f51f87112147947b1bd642619ee2 Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:07:20 +0100 Subject: [PATCH 11/21] Use $GLOBAL instead of implicit variables https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ExtensionArchitecture/BestPractises/ConfigurationFiles.html Applied rule: Ssch\TYPO3Rector\CodeQuality\General\ConvertImplicitVariablesToExplicitGlobalsRector --- ext_tables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_tables.php b/ext_tables.php index 361c05d..2c661af 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -5,7 +5,7 @@ function() { // Hide table in all list views, in order to provide smooth inline editing experience - $TCA['tx_cetimeline_domain_model_entry']['ctrl']['hideTable'] = 1; + $GLOBALS['TCA']['tx_cetimeline_domain_model_entry']['ctrl']['hideTable'] = 1; } ); From bfd332b93443ed11a7f34bc3ca7b536e2dd315ce Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:07:21 +0100 Subject: [PATCH 12/21] Reconfigure ext_emconf.php files Applied rule: Ssch\TYPO3Rector\CodeQuality\General\ExtEmConfRector --- ext_emconf.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext_emconf.php b/ext_emconf.php index 3c355bf..fab1bb5 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -7,8 +7,6 @@ 'author_email' => 'info@simonkoehler.com', 'author_company' => 'simonkoehler.com', 'state' => 'stable', - 'uploadfolder' => '0', - 'clearCacheOnLoad' => 0, 'version' => '4.0.2', 'constraints' => [ From ed5fa278127e75509e189f4bae2436e9ef9e679f Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:07:23 +0100 Subject: [PATCH 13/21] Use native PHP annotations https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-96688-AttributesForExtbaseAnnotations.html Applied rule: Ssch\TYPO3Rector\TYPO312\v0\ExtbaseAnnotationToAttributeRector --- Classes/Domain/Model/Entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Entry.php b/Classes/Domain/Model/Entry.php index 4aabd71..873bbfc 100644 --- a/Classes/Domain/Model/Entry.php +++ b/Classes/Domain/Model/Entry.php @@ -16,8 +16,8 @@ class Entry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * media * * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> - * @Cascade remove */ + #[Cascade(['value' => 'remove'])] // remove protected $media = null; From ec0fefb53a22ea8fc352890da7f3cce774a12bae Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:07:23 +0100 Subject: [PATCH 14/21] Use new TCA "datetime" field type https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97232-NewTCATypeDatetime.html https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97358-RemovedEvalintFromTCATypeDatetime.html Applied rule: Ssch\TYPO3Rector\TYPO312\v0\MigrateInputDateTimeRector --- Configuration/TCA/tx_cetimeline_domain_model_entry.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index 55cee20..ef8a612 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -84,10 +84,8 @@ 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.starttime', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'default' => 0, ] ], @@ -96,10 +94,8 @@ 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.endtime', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'default' => 0, 'range' => [ 'upper' => mktime(0, 0, 0, 1, 1, 2038) From a6f80ba68741efa28d27e098f5e369fd17fb5a62 Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:07:24 +0100 Subject: [PATCH 15/21] Remove TCA option "cruser_id" https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-98024-TCA-option-cruserid-removed.html Applied rule: Ssch\TYPO3Rector\TYPO312\v0\RemoveCruserIdRector --- Configuration/TCA/tx_cetimeline_domain_model_entry.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index ef8a612..2322968 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -8,7 +8,6 @@ 'sortby' => 'sorting', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', From 021228a681d5f32635d608675bf911b7d4ad8a5d Mon Sep 17 00:00:00 2001 From: Rector Date: Mon, 3 Feb 2025 15:07:25 +0100 Subject: [PATCH 16/21] Use associative array keys for TCA items https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Deprecation-99739-IndexedArrayKeysForTCAItems.html https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Feature-99739-AssociativeArrayKeysForTCAItems.html Applied rule: Ssch\TYPO3Rector\TYPO312\v3\MigrateItemsIndexedKeysToAssociativeRector --- .../TCA/Overrides/tt_content_ce_timeline.php | 6 +- .../TCA/tx_cetimeline_domain_model_entry.php | 60 +++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Configuration/TCA/Overrides/tt_content_ce_timeline.php b/Configuration/TCA/Overrides/tt_content_ce_timeline.php index 345d9bc..383c306 100644 --- a/Configuration/TCA/Overrides/tt_content_ce_timeline.php +++ b/Configuration/TCA/Overrides/tt_content_ce_timeline.php @@ -8,9 +8,9 @@ 'tt_content', 'CType', [ - 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang.xlf:ce_title', - 'ce_timeline', - 'ce-timeline-icon' + 'label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang.xlf:ce_title', + 'value' => 'ce_timeline', + 'icon' => 'ce-timeline-icon' ], 'header', 'after' diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index 2322968..f008041 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -55,7 +55,7 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_cetimeline_domain_model_entry', 'foreign_table_where' => 'AND tx_cetimeline_domain_model_entry.pid=###CURRENT_PID### AND tx_cetimeline_domain_model_entry.sys_language_uid IN (-1,0)', @@ -73,7 +73,7 @@ 'type' => 'check', 'items' => [ '1' => [ - '0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' + 'label' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' ] ], ], @@ -124,7 +124,7 @@ 'type' => 'check', 'items' => [ '1' => [ - '0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' + 'label' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' ] ], ], @@ -143,14 +143,14 @@ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['1', 1], - ['2', 2], - ['3', 3], - ['4', 4], - ['5', 5], - ['6', 6], - ['7', 7], - ['8', 8] + ['label' => '1', 'value' => 1], + ['label' => '2', 'value' => 2], + ['label' => '3', 'value' => 3], + ['label' => '4', 'value' => 4], + ['label' => '5', 'value' => 5], + ['label' => '6', 'value' => 6], + ['label' => '7', 'value' => 7], + ['label' => '8', 'value' => 8] ], 'default' => '1' ], @@ -169,8 +169,8 @@ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['33%', 33], - ['50%', 50] + ['label' => '33%', 'value' => 33], + ['label' => '50%', 'value' => 50] ], 'default' => '50' ], @@ -247,10 +247,10 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textblock', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.timeentry', 1], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textimage', 2], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.html', 3], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textblock', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.timeentry', 'value' => 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textimage', 'value' => 2], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.html', 'value' => 3], ], ] ], @@ -270,13 +270,13 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.default', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h1', 1], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h2', 2], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h3', 3], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h4', 4], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h5', 5], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h6', 6] + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.default', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h1', 'value' => 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h2', 'value' => 2], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h3', 'value' => 3], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h4', 'value' => 4], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h5', 'value' => 5], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h6', 'value' => 6] ], ] ], @@ -295,10 +295,10 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.top', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.bottom', 1], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.left', 2], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.right', 3] + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.top', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.bottom', 'value' => 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.left', 'value' => 2], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.right', 'value' => 3] ], ] ], @@ -356,8 +356,8 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.left', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.right', 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.left', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.right', 'value' => 1], ], ] ], From 91e9b51609681a09cf6ac4f37f529e5d64f60bd0 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 6 Feb 2025 14:49:52 +0100 Subject: [PATCH 17/21] Format domain model entry TCA definition --- .../TCA/tx_cetimeline_domain_model_entry.php | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index f008041..1116746 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -23,20 +23,49 @@ 'iconfile' => 'EXT:ce_timeline/Resources/Public/Icons/content-timeline-record.svg', ], 'types' => [ - '1' => ['showitem' => 'l10n_parent, l10n_diffsource, --palette--;;settings, --palette--;;titles, description, description_html, --div--;Galerie, --palette--;;dimensions,--palette--;;lightbox, --div--;Access, starttime, endtime'], + '1' => [ + 'showitem' => ' + l10n_parent, l10n_diffsource, + --palette--;;settings, + --palette--;;titles, + description, description_html, + + --div--;Galerie, + --palette--;;dimensions, + --palette--;;lightbox, + + --div--;Access, + starttime, endtime' + ], ], 'palettes' =>[ 'settings' =>[ - 'showitem' => 'position,typeof, hidden', + 'showitem' => ' + position, + typeof, + hidden', ], 'titles' =>[ - 'showitem' => 'header,header_layout', + 'showitem' => ' + header, + header_layout', ], 'dimensions' =>[ - 'showitem' => 'media, --linebreak--,textimage_layout,image_width, image_height,images_per_row, gallery_width', + 'showitem' => ' + media, + --linebreak--, + + textimage_layout, + image_width, + image_height, + images_per_row, + gallery_width', ], 'lightbox' =>[ - 'showitem' => 'enable_lightbox,lightbox_width,lightbox_height', + 'showitem' => ' + enable_lightbox, + lightbox_width, + lightbox_height', ], ], 'columns' => [ From f806ea87245ea89cfaa78c512e8184019d4805e9 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 6 Feb 2025 14:53:24 +0100 Subject: [PATCH 18/21] Better TCA space usage in Gallery .. put image width and height on the same line, reducing 3 TCA lines to 2. --- Configuration/TCA/tx_cetimeline_domain_model_entry.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index 1116746..d986b99 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -58,6 +58,8 @@ textimage_layout, image_width, image_height, + --linebreak--, + images_per_row, gallery_width', ], From 5d350124dd199fe78f929bb8a6eaed6a8bbb5353 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 6 Feb 2025 14:59:08 +0100 Subject: [PATCH 19/21] Drop support for TYPO3v11 The TYPO3v12 breaking changes do not allow us to support TYPO3v11 anymore - not without many version checks and different configurations for each version. --- composer.json | 2 +- ext_emconf.php | 2 +- rector.php | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index eeaa31e..ea12303 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "license": "GPL-3.0-or-later", "require": { - "typo3/cms-core": "^11.5 || ^12.0" + "typo3/cms-core": "^12.0" }, "keywords": [ "TYPO3", diff --git a/ext_emconf.php b/ext_emconf.php index fab1bb5..704d271 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -11,7 +11,7 @@ 'constraints' => [ 'depends' => [ - 'typo3' => '11.5.0-12.4.99' + 'typo3' => '12.0.0-12.4.99' ], 'conflicts' => [ diff --git a/rector.php b/rector.php index 940d5d3..05f7030 100644 --- a/rector.php +++ b/rector.php @@ -36,7 +36,7 @@ ]) ->withConfiguredRule(ExtEmConfRector::class, [ ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.3.0-8.4.99', - ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '11.5.0-12.4.99', + ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.0-12.4.99', ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [] ]) ->withImportNames(importNames: false, importDocBlockNames: false, importShortClasses: false, removeUnusedImports: true) @@ -45,8 +45,6 @@ // @see https://github.com/sabbelasichon/typo3-rector/issues/2536 __DIR__ . '/**/Configuration/ExtensionBuilder/*', NameImportingPostRector::class => [ - 'ext_localconf.php', // This line can be removed since TYPO3 11.4, see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Important-94280-MoveContentsOfExtPhpIntoLocalScopes.html - 'ext_tables.php', // This line can be removed since TYPO3 11.4, see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Important-94280-MoveContentsOfExtPhpIntoLocalScopes.html 'ClassAliasMap.php', ], \Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class, From bd80c02c258e8ba1c144e895754039e69d06d23d Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 6 Feb 2025 16:57:36 +0100 Subject: [PATCH 20/21] Move "hideTable" config to TCA table definition .. so that TYPO3 does not complain about TCA modifications in ext_tables.php anymore. --- .../TCA/tx_cetimeline_domain_model_entry.php | 1 + ext_tables.php | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 ext_tables.php diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index d986b99..99a9a10 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -20,6 +20,7 @@ 'starttime' => 'starttime', 'endtime' => 'endtime' ], + 'hideTable' => true, 'iconfile' => 'EXT:ce_timeline/Resources/Public/Icons/content-timeline-record.svg', ], 'types' => [ diff --git a/ext_tables.php b/ext_tables.php deleted file mode 100644 index 2c661af..0000000 --- a/ext_tables.php +++ /dev/null @@ -1,11 +0,0 @@ - Date: Thu, 6 Feb 2025 17:20:18 +0100 Subject: [PATCH 21/21] Remove ext_emconf.php This is not needed anymore; TYPO3v12 uses composer.json exclusively. --- ext_emconf.php | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 ext_emconf.php diff --git a/ext_emconf.php b/ext_emconf.php deleted file mode 100644 index 704d271..0000000 --- a/ext_emconf.php +++ /dev/null @@ -1,23 +0,0 @@ - 'Timeline Content Element', - 'description' => 'Add a new content element of type "Timeline" for displaying histories of companies and more...', - 'category' => 'fe', - 'author' => 'Simon Köhler', - 'author_email' => 'info@simonkoehler.com', - 'author_company' => 'simonkoehler.com', - 'state' => 'stable', - 'version' => '4.0.2', - 'constraints' => - [ - 'depends' => [ - 'typo3' => '12.0.0-12.4.99' - ], - 'conflicts' => [ - - ], - 'suggests' => [ - - ], - ] -];