Skip to content

Commit

Permalink
[TASK] Drop support for TYPO3v10
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala committed Jun 7, 2023
1 parent 2c184a8 commit 23b5e09
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 111 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
php:
- '7.4'
typo3:
- '^10.4'
- '^11.5'
elasticsearch:
- '5'
Expand Down
5 changes: 1 addition & 4 deletions Classes/Command/Index/AbstractIndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
}
}
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions doc/index-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'version' => '5.0.0',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-11.5.99',
'typo3' => '11.5.0-11.5.99',
],
],
];
96 changes: 30 additions & 66 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down
45 changes: 14 additions & 31 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
);

0 comments on commit 23b5e09

Please sign in to comment.