From 23b5e091243d1066b36b9cf97e76d40c522e00af Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Wed, 7 Jun 2023 10:17:08 +0200 Subject: [PATCH] [TASK] Drop support for TYPO3v10 --- .github/workflows/ci.yml | 1 - .../Command/Index/AbstractIndexCommand.php | 5 +- composer.json | 10 +- doc/index-update.md | 4 +- ext_emconf.php | 2 +- ext_localconf.php | 96 ++++++------------- ext_tables.php | 45 +++------ 7 files changed, 52 insertions(+), 111 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35a330f2..dfac7c30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,6 @@ jobs: php: - '7.4' typo3: - - '^10.4' - '^11.5' elasticsearch: - '5' diff --git a/Classes/Command/Index/AbstractIndexCommand.php b/Classes/Command/Index/AbstractIndexCommand.php index 6baf68a0..80d56919 100644 --- a/Classes/Command/Index/AbstractIndexCommand.php +++ b/Classes/Command/Index/AbstractIndexCommand.php @@ -6,7 +6,6 @@ use PAGEmachine\Searchable\Service\IndexingService; use Symfony\Component\Console\Command\Command; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\VersionNumberUtility; use TYPO3\CMS\Extbase\Object\ObjectManager; abstract class AbstractIndexCommand extends Command @@ -23,8 +22,6 @@ public function __construct(...$arguments) $objectManager = GeneralUtility::makeInstance(ObjectManager::class); $this->indexingService = $objectManager->get(IndexingService::class); - if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '11', '>=')) { - $GLOBALS['BE_USER']->initializeUserSessionManager(); - } + $GLOBALS['BE_USER']->initializeUserSessionManager(); } } diff --git a/composer.json b/composer.json index 411a7eaa..0a9b0732 100644 --- a/composer.json +++ b/composer.json @@ -12,11 +12,11 @@ "require": { "php": "^7.4", "elasticsearch/elasticsearch": "~5.0 || ~7.0", - "typo3/cms-backend": "^10.4 || ^11.5", - "typo3/cms-core": "^10.4 || ^11.5", - "typo3/cms-extbase": "^10.4 || ^11.5", - "typo3/cms-fluid": "^10.4 || ^11.5", - "typo3/cms-frontend": "^10.4 || ^11.5" + "typo3/cms-backend": "^11.5", + "typo3/cms-core": "^11.5", + "typo3/cms-extbase": "^11.5", + "typo3/cms-fluid": "^11.5", + "typo3/cms-frontend": "^11.5" }, "require-dev": { "codedungeon/phpunit-result-printer": "^0.32.0", diff --git a/doc/index-update.md b/doc/index-update.md index 3498ea09..222c4b25 100644 --- a/doc/index-update.md +++ b/doc/index-update.md @@ -18,9 +18,7 @@ To perform partial index updates run the following command: You should set up a Scheduler task using the _Extbase CommandController Task_ to execute this periodically, e.g. every 5 minutes. -For TYPO3v7 a hook for the `DatabaseConnection` takes care of queueing index updates. - -For TYPO3v8 and newer you need to add a database connection `wrapperClass` in your `LocalConfiguration.php`: +You need to add a database connection `wrapperClass` in your `LocalConfiguration.php`: ```php diff --git a/ext_emconf.php b/ext_emconf.php index e413eba8..51505e15 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -11,7 +11,7 @@ 'version' => '5.0.0', 'constraints' => [ 'depends' => [ - 'typo3' => '10.4.0-11.5.99', + 'typo3' => '11.5.0-11.5.99', ], ], ]; diff --git a/ext_localconf.php b/ext_localconf.php index 7af7319f..a9b56246 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -3,75 +3,39 @@ die('Access denied.'); } -if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11', '>=')) { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'Searchable', - 'Searchbar', - [ - \PAGEmachine\Searchable\Controller\SearchController::class => 'searchbar', - ], - [ - \PAGEmachine\Searchable\Controller\SearchController::class => 'searchbar', - ] - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'Searchable', - 'LiveSearchbar', - [ - \PAGEmachine\Searchable\Controller\SearchController::class => 'liveSearchbar', - ], - [ - \PAGEmachine\Searchable\Controller\SearchController::class => 'liveSearchbar', - ] - ); - - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'Searchable', - 'Results', - [ - \PAGEmachine\Searchable\Controller\SearchController::class => 'results', - ], - [ - \PAGEmachine\Searchable\Controller\SearchController::class => 'results', - ] - ); -} else { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'PAGEmachine.Searchable', - 'Searchbar', - [ - 'Search' => 'searchbar', - ], - [ - 'Search' => 'searchbar', - ] - ); +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'Searchable', + 'Searchbar', + [ + \PAGEmachine\Searchable\Controller\SearchController::class => 'searchbar', + ], + [ + \PAGEmachine\Searchable\Controller\SearchController::class => 'searchbar', + ] +); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'PAGEmachine.Searchable', - 'LiveSearchbar', - [ - 'Search' => 'liveSearchbar', - ], - [ - 'Search' => 'liveSearchbar', - ] - ); +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'Searchable', + 'LiveSearchbar', + [ + \PAGEmachine\Searchable\Controller\SearchController::class => 'liveSearchbar', + ], + [ + \PAGEmachine\Searchable\Controller\SearchController::class => 'liveSearchbar', + ] +); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'PAGEmachine.Searchable', - 'Results', - [ - 'Search' => 'results', - ], - [ - 'Search' => 'results', - ] - ); -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'Searchable', + 'Results', + [ + \PAGEmachine\Searchable\Controller\SearchController::class => 'results', + ], + [ + \PAGEmachine\Searchable\Controller\SearchController::class => 'results', + ] +); // Add custom logging if (empty($GLOBALS['TYPO3_CONF_VARS']['LOG']['PAGEmachine']['Searchable']['writerConfiguration'])) { diff --git a/ext_tables.php b/ext_tables.php index ef21fbdb..dd531f24 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -3,34 +3,17 @@ die('Access denied.'); } -if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11', '>=')) { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'Searchable', - 'web', - 'searchable', - '', - [ - \PAGEmachine\Searchable\Controller\BackendController::class => 'start, search, request, resetIndices, indexFull, indexPartial', - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:searchable/ext_icon.svg', - 'labels' => 'LLL:EXT:searchable/Resources/Private/Language/locallang_mod.xlf', - ] - ); -} else { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'PAGEmachine.Searchable', - 'web', - 'searchable', - '', - [ - 'Backend' => 'start, search, request, resetIndices, indexFull, indexPartial', - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:searchable/ext_icon.svg', - 'labels' => 'LLL:EXT:searchable/Resources/Private/Language/locallang_mod.xlf', - ] - ); -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'Searchable', + 'web', + 'searchable', + '', + [ + \PAGEmachine\Searchable\Controller\BackendController::class => 'start, search, request, resetIndices, indexFull, indexPartial', + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:searchable/ext_icon.svg', + 'labels' => 'LLL:EXT:searchable/Resources/Private/Language/locallang_mod.xlf', + ] +);