From 2fbeaed27c8d7f59da2656e2c96aceaa473512a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Lochmu=CC=88ller?= Date: Tue, 4 Jan 2022 09:07:01 +0100 Subject: [PATCH 1/2] Add V11 constraints --- composer.json | 4 ++-- ext_emconf.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 936a861..cbe0f9e 100755 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ "GPL-3.0" ], "require": { - "php":"^7.0 || ^7.1 || ^7.2 || ^7.3 || ^7.4", - "typo3/cms-core": "^8.7 || ^9.5 || ^10.4" + "php":"^7.0 || ^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0", + "typo3/cms-core": "^8.7 || ^9.5 || ^10.4 || ^11.5" }, "require-dev": { "namelesscoder/typo3-repository-client": "^2.0", diff --git a/ext_emconf.php b/ext_emconf.php index af5fb47..5de9e98 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -12,7 +12,7 @@ [ 'depends' => [ - 'typo3' => '8.7.17-10.4.99', + 'typo3' => '8.7.17-11.5.99', ], 'conflicts' => [ From 2a0d7ee2986ab3fa54f6d044c1980889e999c3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Lochmu=CC=88ller?= Date: Tue, 4 Jan 2022 09:16:10 +0100 Subject: [PATCH 2/2] Add TYPO3 v11 support --- Classes/Domain/Model/Dto/ExtensionConfiguration.php | 2 +- Classes/Service/VersionService.php | 9 +++++++++ ext_tables.php | 8 +++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Classes/Domain/Model/Dto/ExtensionConfiguration.php b/Classes/Domain/Model/Dto/ExtensionConfiguration.php index 60b56c7..80c1c92 100644 --- a/Classes/Domain/Model/Dto/ExtensionConfiguration.php +++ b/Classes/Domain/Model/Dto/ExtensionConfiguration.php @@ -31,7 +31,7 @@ public function __construct() if (VersionService::isVersion8()) { $settings = (array)unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['iconcheck'], [ false ]); } - if (VersionService::isVersion9() || VersionService::isVersion10()) { + if (VersionService::isVersion9() || VersionService::isVersion10() || VersionService::isVersion11()) { $settings = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class)->get('iconcheck'); } diff --git a/Classes/Service/VersionService.php b/Classes/Service/VersionService.php index 23b4a79..b7bd3cb 100644 --- a/Classes/Service/VersionService.php +++ b/Classes/Service/VersionService.php @@ -35,6 +35,15 @@ public static function isVersion10(): bool } + public static function isVersion11(): bool + { + $constraintVersionMax = 11999999; + $constraintVersionMin = 11000000; + + return static::evaluateCondition($constraintVersionMin, $constraintVersionMax); + + } + /** * @param int $min * @param int $max diff --git a/ext_tables.php b/ext_tables.php index c0f6084..fe88635 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -23,6 +23,12 @@ $isEnableModuleForEverybody = $extConfIconcheck->isEnableModuleForEverybody(); } +if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($typo3Version) >= 11000000) { + $controller = \JosefGlatz\Iconcheck\Controller\IconcheckController::class; +} else { + $controller = 'Iconcheck'; +} + // Register backend module if it is not disabled if (!$isDisableModule) { \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( @@ -31,7 +37,7 @@ 'tx_iconcheck_m1', '', [ - 'Iconcheck' => 'index' + $controller => 'index' ], [ 'access' => $isEnableModuleForEverybody ? 'user,group' : 'admin',