From 00cd5df294c875ea1e00ab2f645a338a6bd92c8e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 17 Dec 2025 10:11:18 +0100 Subject: Use native PHP #[Deprecated] (#8325) https://php.watch/versions/8.4/Deprecated And enfore it with PHPUnit + PHPStan. Especially useful for extensions. --- lib/Minz/ActionController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Minz/ActionController.php') diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php index 9549a146f..eb6e8477d 100644 --- a/lib/Minz/ActionController.php +++ b/lib/Minz/ActionController.php @@ -27,6 +27,8 @@ abstract class Minz_ActionController { * Gives the possibility to override the default view model type. * @var class-string * @deprecated Use constructor with view type instead + * @access private + * @internal */ public static string $defaultViewType = Minz_View::class; @@ -43,8 +45,8 @@ abstract class Minz_ActionController { $view = null; } } - if ($view === null && class_exists(self::$defaultViewType)) { - $view = new self::$defaultViewType(); + if ($view === null && class_exists(self::$defaultViewType)) { /// @phpstan-ignore staticProperty.deprecated + $view = new self::$defaultViewType(); // @phpstan-ignore staticProperty.deprecated if (!($view instanceof Minz_View)) { $view = null; } -- cgit v1.2.3