aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/View.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/View.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/View.php')
-rw-r--r--lib/Minz/View.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Minz/View.php b/lib/Minz/View.php
index 65573c7bd..eebd7ee92 100644
--- a/lib/Minz/View.php
+++ b/lib/Minz/View.php
@@ -39,8 +39,9 @@ class Minz_View {
}
/**
- * @deprecated Change the view file based on controller and action.
+ * Change the view file based on controller and action.
*/
+ #[Deprecated('Use Minz_View::_path() instead.')]
public function change_view(string $controller_name, string $action_name): void {
Minz_Log::warning('Minz_View::change_view is deprecated, it will be removed in a future version. Please use Minz_View::_path instead.');
$this->_path($controller_name . '/' . $action_name . '.phtml');
@@ -170,9 +171,9 @@ class Minz_View {
/**
* Choose if we want to use the layout or not.
- * @deprecated Please use the `_layout` function instead.
* @param bool $use true if we want to use the layout, false else
*/
+ #[Deprecated('Use Minz_View::_layout() instead.')]
public function _useLayout(bool $use): void {
Minz_Log::warning('Minz_View::_useLayout is deprecated, it will be removed in a future version. Please use Minz_View::_layout instead.');
if ($use) {