Skip to content

Commit

Permalink
Merge pull request josefglatz#13 from lochmueller/master
Browse files Browse the repository at this point in the history
Add TYPO3 v11 support
  • Loading branch information
josefglatz authored May 16, 2023
2 parents 4d08af2 + 2a0d7ee commit c829648
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Dto/ExtensionConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
9 changes: 9 additions & 0 deletions Classes/Service/VersionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[
'depends' =>
[
'typo3' => '8.7.17-10.4.99',
'typo3' => '8.7.17-11.5.99',
],
'conflicts' =>
[
Expand Down
8 changes: 7 additions & 1 deletion ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -31,7 +37,7 @@
'tx_iconcheck_m1',
'',
[
'Iconcheck' => 'index'
$controller => 'index'
],
[
'access' => $isEnableModuleForEverybody ? 'user,group' : 'admin',
Expand Down

0 comments on commit c829648

Please sign in to comment.