Skip to content

Commit

Permalink
✨TYPO3 10 compatibility (#48)
Browse files Browse the repository at this point in the history
✨ TYPO3 10 compatibility
  • Loading branch information
kitzberger authored Mar 21, 2022
1 parent a7fa73a commit 00f617e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
12 changes: 5 additions & 7 deletions Classes/Task/GarbageCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace KKSoftware\IndexedSearchGC\Task;

use KKSoftware\IndexedSearchGC\Service\GarbageCollectorService;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Log\Logger;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility;
use TYPO3\CMS\Scheduler\Task\AbstractTask;

/**
Expand Down Expand Up @@ -37,15 +37,13 @@ public function execute()
/** @var ObjectManager $om */
$om = GeneralUtility::makeInstance(ObjectManager::class);

/** @var ConfigurationUtility $configurationUtility */
$configurationUtility = $om->get(ConfigurationUtility::class);

$result = $configurationUtility->getCurrentConfiguration('indexed_search_gc');
/** @var ExtensionConfiguration $extensionConfiguration */
$extensionConfiguration = $om->get(ExtensionConfiguration::class);
$result = $extensionConfiguration->get('indexed_search_gc');

$this->logger->debug('Configuration Data', $result);


$service = new GarbageCollectorService($result['garbageCollectionCleanupDelay']['value']);
$service = new GarbageCollectorService($result['garbageCollectionCleanupDelay']);

$service->collect();

Expand Down
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
}
],
"require": {
"typo3/cms-core": "^8.7.13",
"typo3/cms-indexed-search": "^8.7.13",
"typo3/cms-scheduler": "^8.7.13"
"typo3/cms-core": "^9.5 || ^10.4",
"typo3/cms-indexed-search": "^9.5 || ^10.4",
"typo3/cms-scheduler": "^9.5 || ^10.4"
},
"require-dev": {
"roave/security-advisories": "dev-master"
Expand All @@ -31,5 +31,10 @@
"psr-4": {
"KKSoftware\\IndexedSearchGC\\": "Classes"
}
},
"extra": {
"typo3/cms": {
"extension-key": "indexed_search_gc"
}
}
}
}
8 changes: 4 additions & 4 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$EM_CONF['indexed_search_gc'] = [
$EM_CONF[$_EXTKEY] = [
'title' => 'Indexed Search Garbage Collector',
'description' => 'Provides a configurable Scheduler Task to Cleanup old IndexedSearch Entries',
'category' => 'plugin',
Expand All @@ -14,9 +14,9 @@
'version' => '1.0.0',
'constraints' => [
'depends' => [
'typo3' => '8.7.0-8.7.99',
'indexed_search' => '8.7.0-8.7.99',
'scheduler' => '8.7.0-8.7.99'
'typo3' => '9.5.0-10.4.99',
'indexed_search' => '9.5.0-10.4.99',
'scheduler' => '9.5.0-10.4.99'
],
'conflicts' => [],
'suggests' => [],
Expand Down
4 changes: 2 additions & 2 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* Configuration for Scheduler TASK
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\KKSoftware\IndexedSearchGC\Task\GarbageCollector::class] = [
'extension' => $_EXTKEY,
'extension' => 'indexed_search_gc',
'title' => 'Indexed Search Garbage Collection',
'description' => '',
'additionalFields' => ''
];
];

0 comments on commit 00f617e

Please sign in to comment.