MDL-78165 lib: Added class properties that are not declared in classes

In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
This commit is contained in:
Meirza
2023-06-14 20:18:24 +07:00
committed by meirzamoodle
parent 8c989335be
commit 352932e61f
10 changed files with 33 additions and 15 deletions
+5
View File
@@ -77,6 +77,9 @@ abstract class base {
/** @var int Move a plugin down in the plugin order */
public const MOVE_DOWN = 1;
/** @var string Name of the plugin */
public $component;
/**
* Whether this plugintype supports its plugins being disabled.
*
@@ -153,6 +156,7 @@ abstract class base {
$plugin->type = $type;
$plugin->typerootdir = $typerootdir;
$plugin->name = $name;
$plugin->component = $plugin->type.'_'.$plugin->name;
$plugin->rootdir = null;
$plugin->displayname = $name;
$plugin->versiondb = $version;
@@ -183,6 +187,7 @@ abstract class base {
$plugin->name = $name;
$plugin->rootdir = $namerootdir;
$plugin->pluginman = $pluginman;
$plugin->component = $plugin->type.'_'.$plugin->name;
$plugin->init_display_name();
$plugin->load_disk_version();