From 9aec45ccc7805b8a27630ed3c22aeec9f8d11830 Mon Sep 17 00:00:00 2001 From: Markus Crasser Date: Mon, 27 May 2024 16:42:36 +0200 Subject: [PATCH] Revert "Basic compatibility to TYPO3 11.5 and 12.4" This reverts commit c3baa93f1601e5d720774f3e08222bf6e45695ae. --- .github/workflows/phpci.yml | 18 ++++++++-------- Classes/Task/CleanerTaskFieldProvider.php | 21 ++++++++++++------- README.md | 2 +- Tests/Unit/Task/CleanerTaskTest.php | 5 ++--- .../Task/CleanupTaskFieldProviderTest.php | 2 +- composer.json | 4 ++-- ext_emconf.php | 7 +++++++ ext_localconf.php | 2 +- ext_tables.php | 2 +- 9 files changed, 37 insertions(+), 26 deletions(-) diff --git a/.github/workflows/phpci.yml b/.github/workflows/phpci.yml index 2a28ca4..5554901 100644 --- a/.github/workflows/phpci.yml +++ b/.github/workflows/phpci.yml @@ -20,9 +20,9 @@ jobs: strategy: matrix: php-version: - - "8.1" - - "8.2" - - "8.3" + - "7.2" + - "7.3" + - "7.4" steps: - @@ -71,9 +71,9 @@ jobs: - "test:phpmd" - "test:phpstan" php-version: - - "8.1" - - "8.2" - - "8.3" + - "7.2" + - "7.3" + - "7.4" steps: - @@ -119,9 +119,9 @@ jobs: fail-fast: false matrix: php-version: - - "8.1" - - "8.2" - - "8.3" + - "7.2" + - "7.3" + - "7.4" steps: - diff --git a/Classes/Task/CleanerTaskFieldProvider.php b/Classes/Task/CleanerTaskFieldProvider.php index 3c01f55..62a6fc8 100644 --- a/Classes/Task/CleanerTaskFieldProvider.php +++ b/Classes/Task/CleanerTaskFieldProvider.php @@ -27,8 +27,6 @@ namespace DMK\Mkcleaner\Task; -use TYPO3\CMS\Scheduler\AbstractAdditionalFieldProvider; -use TYPO3\CMS\Core\Messaging\AbstractMessage; use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface; @@ -42,12 +40,13 @@ * @license http://www.gnu.org/licenses/lgpl.html * GNU Lesser General Public License, version 3 or later */ -class CleanerTaskFieldProvider extends AbstractAdditionalFieldProvider +class CleanerTaskFieldProvider implements AdditionalFieldProviderInterface { /** * @var Helper */ protected $taskHelper; + /** * @todo use DI with newer TYPO3 versions */ @@ -55,6 +54,7 @@ public function __construct(Helper $taskHelper = null) { $this->taskHelper = $taskHelper ?? GeneralUtility::makeInstance(Helper::class); } + /** * @param array $taskInfo * @param CleanerTask $task @@ -64,7 +64,7 @@ public function __construct(Helper $taskHelper = null) public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $parentObject) { $fieldName = 'foldersToClean'; - if ('edit' == (string) $parentObject->getCurrentAction()) { + if ('edit' == $parentObject->CMD) { $taskInfo[$fieldName] = $task->getFoldersToClean(); } $fieldHtml = '