add php min, require php >= 8.1
This commit is contained in:
parent
381f065d11
commit
c21672138e
@ -24,7 +24,9 @@ class Backend extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
self::$init = defined('DC_CONTEXT_ADMIN');
|
if (defined('DC_CONTEXT_ADMIN')) {
|
||||||
|
self::$init = dcCore::app()->auth->isSuperAdmin() && version_compare(phpversion(), My::PHP_MIN, '>=');
|
||||||
|
}
|
||||||
|
|
||||||
return self::$init;
|
return self::$init;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,13 @@ class Config extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
self::$init = defined('DC_CONTEXT_ADMIN');
|
if (defined('DC_CONTEXT_ADMIN')) {
|
||||||
|
if (version_compare(phpversion(), My::PHP_MIN, '>=')) {
|
||||||
|
self::$init = true;
|
||||||
|
} else {
|
||||||
|
dcCore::app()->error->add(sprintf(__('%s required php >= %s'), My::id(), My::PHP_MIN));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return self::$init;
|
return self::$init;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@ use dcCore;
|
|||||||
|
|
||||||
class My
|
class My
|
||||||
{
|
{
|
||||||
|
/** @var string Required php version */
|
||||||
|
public const PHP_MIN = '8.1';
|
||||||
|
|
||||||
/** @var array Excluded files */
|
/** @var array Excluded files */
|
||||||
public const EXCLUDED_FILES = [
|
public const EXCLUDED_FILES = [
|
||||||
'.',
|
'.',
|
||||||
|
Loading…
Reference in New Issue
Block a user