Просмотр исходного кода

PHP8.2 fixes, fix dynamic property creation (#3258)

as of PHP8.2, dynamic property creation is no longer allowed by default (with the exception of StdClass), and triggers E_DEPRECATED, ref https://wiki.php.net/rfc/deprecate_dynamic_properties

violations were detected with PHP-Rector using CompleteDynamicPropertiesRector ( https://github.com/rectorphp/rector/blob/main/rules/CodeQuality/Rector/Class_/CompleteDynamicPropertiesRector.php )
divinity76 3 лет назад
Родитель
Сommit
db2363a982

+ 1 - 0
install/deb/filemanager/filegator/backend/Services/Archiver/Adapters/HestiaZipArchiver.php

@@ -10,6 +10,7 @@ use Filegator\Services\Tmpfs\TmpfsInterface;
 use function Hestiacp\quoteshellarg\quoteshellarg;
 use function Hestiacp\quoteshellarg\quoteshellarg;
 
 
 class HestiaZipArchiver extends ZipArchiver implements Service, ArchiverInterface {
 class HestiaZipArchiver extends ZipArchiver implements Service, ArchiverInterface {
+	public TmpfsInterface $tmpfs;
 	protected $container;
 	protected $container;
 
 
 	public function __construct(TmpfsInterface $tmpfs, Container $container) {
 	public function __construct(TmpfsInterface $tmpfs, Container $container) {

+ 7 - 0
install/deb/phpmyadmin/hestia-sso.php

@@ -10,6 +10,13 @@ define("API_HESTIA_PORT", "%API_HESTIA_PORT%");
 define("API_KEY", "%API_KEY%");
 define("API_KEY", "%API_KEY%");
 
 
 class Hestia_API {
 class Hestia_API {
+	/** @var string */
+	public $hostname;
+	/** @var string */
+	public $key;
+	/** @var string */
+	public $pma_key;
+	/** @var string */
 	private $api_url;
 	private $api_url;
 	public function __construct() {
 	public function __construct() {
 		$this->hostname = "https://" . API_HOST_NAME . ":" . API_HESTIA_PORT . "/api/";
 		$this->hostname = "https://" . API_HOST_NAME . ":" . API_HESTIA_PORT . "/api/";

+ 2 - 0
web/src/app/System/HestiaApp.php

@@ -6,6 +6,8 @@ namespace Hestia\System;
 use function Hestiacp\quoteshellarg\quoteshellarg;
 use function Hestiacp\quoteshellarg\quoteshellarg;
 
 
 class HestiaApp {
 class HestiaApp {
+	/** @var string[] */
+	public $errors;
 	protected const TMPDIR_DOWNLOADS = "/tmp/hestia-webapp";
 	protected const TMPDIR_DOWNLOADS = "/tmp/hestia-webapp";
 	protected $phpsupport = false;
 	protected $phpsupport = false;
 
 

+ 2 - 0
web/src/app/WebApp/Installers/BaseSetup.php

@@ -11,6 +11,8 @@ use Hestia\WebApp\Installers\Resources\ComposerResource;
 use Hestia\WebApp\Installers\Resources\WpResource;
 use Hestia\WebApp\Installers\Resources\WpResource;
 
 
 abstract class BaseSetup implements InstallerInterface {
 abstract class BaseSetup implements InstallerInterface {
+	public $appInfo;
+	public $config;
 	protected $domain;
 	protected $domain;
 	protected $extractsubdir;
 	protected $extractsubdir;
 	protected $AppDirInstall;
 	protected $AppDirInstall;