use define php min

This commit is contained in:
Jean-Christian Denis 2023-05-10 11:43:16 +02:00
parent a4cfc8a29a
commit 8922853731
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
8 changed files with 4 additions and 18 deletions

View file

@ -20,7 +20,10 @@ $this->registerModule(
'Jean-Christian Denis and contributors',
'3.1',
[
'requires' => [['core', '2.26']],
'requires' => [
['php', '8.1'],
['core', '2.26']],
],
'permissions' => dcCore::app()->auth->makePermissions([
dcCore::app()->auth::PERMISSION_USAGE,
dcCore::app()->auth::PERMISSION_CONTENT_ADMIN,

View file

@ -39,7 +39,6 @@ class Backend extends dcNsProcess
{
static::$init = defined('DC_CONTEXT_ADMIN')
&& defined('ACTIVITY_REPORT')
&& My::phpCompliant()
&& My::isInstalled();
return static::$init;

View file

@ -41,7 +41,6 @@ class Config extends dcNsProcess
{
static::$init == defined('DC_CONTEXT_ADMIN')
&& defined('ACTIVITY_REPORT')
&& My::phpCompliant()
&& dcCore::app()->auth?->check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_ADMIN,
]), dcCore::app()->blog?->id);

View file

@ -25,7 +25,6 @@ class Frontend extends dcNsProcess
public static function init(): bool
{
static::$init = defined('ACTIVITY_REPORT')
&& My::phpCompliant()
&& My::isInstalled();
return static::$init;

View file

@ -31,7 +31,6 @@ class Install extends dcNsProcess
public static function init(): bool
{
static::$init = defined('DC_CONTEXT_ADMIN')
&& My::phpCompliant()
&& dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version'));
return static::$init;

View file

@ -38,7 +38,6 @@ class Manage extends dcNsProcess
{
static::$init = defined('DC_CONTEXT_ADMIN')
&& defined('ACTIVITY_REPORT')
&& My::phpCompliant()
&& dcCore::app()->auth?->check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_ADMIN,
]), dcCore::app()->blog?->id);

View file

@ -30,9 +30,6 @@ class My
/** @var int Incremental version by breaking changes */
public const COMPATIBILITY_VERSION = 3;
/** @var string Required php version */
public const PHP_MIN = '7.4';
/**
* This module id.
*/
@ -59,14 +56,6 @@ class My
return dirname(__DIR__);
}
/**
* Check this module PHP version compliant.
*/
public static function phpCompliant(): bool
{
return version_compare(phpversion(), self::PHP_MIN, '>=');
}
/**
* Check is module is trully installed.
*

View file

@ -26,7 +26,6 @@ class Prepend extends dcNsProcess
public static function init(): bool
{
static::$init = defined('DC_RC_PATH')
&& My::phpCompliant()
&& My::isInstalled();
return static::$init;