From 34ccd1d126720cc0e7b252ce3c69bc3acffe5859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Wolda=C5=84ski?= Date: Tue, 10 Oct 2023 16:33:14 +0200 Subject: [PATCH] [TASK] Version cleanup - allow only v11 of news with version 3 of extension - support only TYPO3 v11/v12 with version 3 of extension --- Configuration/TCA/Overrides/sys_template.php | 29 ++--- Configuration/TypoScript/setup.typoscript | 118 ++++++++++++++---- .../TypoScript/v12/constants.typoscript | 7 -- Configuration/TypoScript/v12/setup.typoscript | 100 --------------- composer.json | 6 +- ext_emconf.php | 8 +- 6 files changed, 109 insertions(+), 159 deletions(-) delete mode 100644 Configuration/TypoScript/v12/constants.typoscript delete mode 100644 Configuration/TypoScript/v12/setup.typoscript diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php index a8d036c..bf547b1 100644 --- a/Configuration/TCA/Overrides/sys_template.php +++ b/Configuration/TCA/Overrides/sys_template.php @@ -1,22 +1,13 @@ getMajorVersion() > 11) { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( - 'headless_news', - 'Configuration/TypoScript/v12', - 'Headless News For V12' - ); - } else { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( - 'headless_news', - 'Configuration/TypoScript', - 'Headless News' - ); - } -}); +(static function () { + ExtensionManagementUtility::addStaticFile( + 'headless_news', + 'Configuration/TypoScript', + 'Headless News' + ); +})(); diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 11acbf8..1532cee 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -1,31 +1,97 @@ -tt_content.list =< lib.contentElementWithHeader -tt_content.list { - fields { - content { - fields { - data = CASE - data { - key.field = list_type +tt_content { + news_pi1 =< lib.contentElementWithHeader + news_pi1 { + fields { + content { + fields { + data = USER + data { + userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run + vendorName = GeorgRinger + extensionName = News + pluginName = Pi1 + controller = News + view =< plugin.tx_news.view + persistence =< plugin.tx_news.persistence + settings =< plugin.tx_news.settings + settings { + dateFormat = TEXT + dateFormat = M d Y + dateTimeFormat = TEXT + dateTimeFormat = Y-m-d H:i:s + } + } + } + } + } + } + + news_newsliststicky < tt_content.news_pi1 + news_newsliststicky { + fields { + content { + fields { + data { + pluginName = NewsListSticky + } + } + } + } + } + + news_newsdatemenu < tt_content.news_pi1 + + news_newssearchresult < tt_content.news_pi1 + news_newssearchresult { + fields { + content { + fields { + data { + pluginName = NewsSearchForm + } + } + } + } + } + + news_categorylist < tt_content.news_pi1 + news_categorylist { + fields { + content { + fields { + data { + pluginName = CategoryList + controller = Category + } + } + } + } + } + + news_taglist < tt_content.news_pi1 + news_taglist { + fields { + content { + fields { + data { + pluginName = TagList + controller = Tag + } + } + } + } + } - news_pi1 = USER - news_pi1 { - userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run - vendorName = GeorgRinger - extensionName = News - pluginName = Pi1 - controller = News - view < plugin.tx_news.view - persistence < plugin.tx_news.persistence - settings < plugin.tx_news.settings - settings { - dateFormat = TEXT - dateFormat = M d Y - dateTimeFormat = TEXT - dateTimeFormat = Y-m-d H:i:s + news_newsdetail < tt_content.news_pi1 + news_newsdetail { + fields { + content { + fields { + data { + pluginName = NewsDetail + } + } } - } } - } } - } } diff --git a/Configuration/TypoScript/v12/constants.typoscript b/Configuration/TypoScript/v12/constants.typoscript deleted file mode 100644 index 3b6afe8..0000000 --- a/Configuration/TypoScript/v12/constants.typoscript +++ /dev/null @@ -1,7 +0,0 @@ -plugin.tx_news { - view { - templateRootPath = EXT:headless_news/Resources/Private/News/Templates/ - partialRootPath = EXT:headless_news/Resources/Private/News/Partials/ - layoutRootPath = EXT:headless_news/Resources/Private/News/Layouts/ - } -} \ No newline at end of file diff --git a/Configuration/TypoScript/v12/setup.typoscript b/Configuration/TypoScript/v12/setup.typoscript deleted file mode 100644 index c241ef7..0000000 --- a/Configuration/TypoScript/v12/setup.typoscript +++ /dev/null @@ -1,100 +0,0 @@ -tt_content.news_pi1 =< lib.contentElementWithHeader -tt_content.news_pi1 { - fields { - content { - fields { - data = USER - data { - userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run - vendorName = GeorgRinger - extensionName = News - pluginName = Pi1 - controller = News - view < plugin.tx_news.view - persistence < plugin.tx_news.persistence - settings < plugin.tx_news.settings - settings { - dateFormat = TEXT - dateFormat = M d Y - dateTimeFormat = TEXT - dateTimeFormat = Y-m-d H:i:s - } - } - } - } - } -} - -tt_content.news_newsliststicky < tt_content.news_pi1 -tt_content.news_newsliststicky { - fields { - content { - fields { - data = USER - data { - pluginName = NewsListSticky - } - } - } - } -} - -tt_content.news_newsdatemenu < tt_content.news_pi1 - -tt_content.news_newssearchresult < tt_content.news_pi1 -tt_content.news_newssearchresult { - fields { - content { - fields { - data = USER - data { - pluginName = NewsSearchForm - } - } - } - } -} - -tt_content.news_categorylist < tt_content.news_pi1 -tt_content.news_categorylist { - fields { - content { - fields { - data = USER - data { - pluginName = CategoryList - controller = Category - } - } - } - } -} - -tt_content.news_taglist < tt_content.news_pi1 -tt_content.news_taglist { - fields { - content { - fields { - data = USER - data { - pluginName = TagList - controller = Tag - } - } - } - } -} - -tt_content.news_newsdetail < tt_content.news_pi1 -tt_content.news_newsdetail { - fields { - content { - fields { - data = USER - data { - pluginName = NewsDetail - } - } - } - } -} \ No newline at end of file diff --git a/composer.json b/composer.json index 0c7a564..c8105aa 100644 --- a/composer.json +++ b/composer.json @@ -28,11 +28,11 @@ } ], "require": { - "typo3/cms-core": "^10.0 || ^12.0" + "typo3/cms-core": "^11.5 || ^12.4" }, "suggest": { - "friendsoftypo3/headless": "^2.0 || ^4.0", - "georgringer/news": "^9.0 || ^11.0" + "friendsoftypo3/headless": "^3.0 || ^4.0", + "georgringer/news": "^11.0" }, "extra": { "typo3/cms": { diff --git a/ext_emconf.php b/ext_emconf.php index 663a63e..ee29f6e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,15 +9,15 @@ 'author_email' => 'extensions@macopedia.com', 'category' => 'fe', 'internal' => '', - 'version' => '2.0.0', + 'version' => '3.0.0', 'constraints' => [ 'depends' => [ - 'typo3' => '10.0.0-12.5.99', - 'frontend' => '10.0.0-12.5.99', + 'typo3' => '11.5.0-12.5.99', + 'frontend' => '11.5.0-12.5.99', ], 'conflicts' => [], 'suggests' => [ - 'headless' => '2.0.0-4.9.9', + 'headless' => '3.0.0-4.9.9', ], ], ];