diff --git a/_define.php b/_define.php index 253fcf9..2352cdd 100644 --- a/_define.php +++ b/_define.php @@ -20,7 +20,10 @@ $this->registerModule( 'Jean-Christian Denis and Contributors', '0.8', [ - 'requires' => [['core', '2.26']], + 'requires' => [ + ['php' => '8.1'], + ['core', '2.26'], + ], 'permissions' => null, 'type' => 'plugin', 'support' => 'https://github.com/JcDenis/' . basename(__DIR__), diff --git a/src/Backend.php b/src/Backend.php index 35812b3..3ae630a 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -22,7 +22,6 @@ class Backend extends dcNsProcess public static function init(): bool { static::$init = defined('DC_CONTEXT_ADMIN') - && My::phpCompliant() && !is_null(dcCore::app()->auth) && dcCore::app()->auth->isSuperAdmin(); diff --git a/src/My.php b/src/My.php index 9286391..10209f7 100644 --- a/src/My.php +++ b/src/My.php @@ -21,9 +21,6 @@ use dcCore; */ class My { - /** @var string This module required php version */ - public const PHP_MIN = '8.1'; - /** * This module id. */ @@ -49,12 +46,4 @@ class My { return dirname(__DIR__); } - - /** - * Check this module PHP version compliant. - */ - public static function phpCompliant(): bool - { - return version_compare(phpversion(), self::PHP_MIN, '>='); - } }