aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/ActionController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-12-17 10:11:18 +0100
committerGravatar GitHub <noreply@github.com> 2025-12-17 10:11:18 +0100
commit00cd5df294c875ea1e00ab2f645a338a6bd92c8e (patch)
treee1dc56d3d01bffea632d1d4c08a1153d7ea7a7c5 /lib/Minz/ActionController.php
parent4bd503591469f47e710f1afbf0b5883f7770065d (diff)
Use native PHP #[Deprecated] (#8325)
https://php.watch/versions/8.4/Deprecated And enfore it with PHPUnit + PHPStan. Especially useful for extensions.
Diffstat (limited to 'lib/Minz/ActionController.php')
-rw-r--r--lib/Minz/ActionController.php6
1 files changed, 4 insertions, 2 deletions
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;
}