aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-03-01 10:08:05 +0100
committerGravatar GitHub <noreply@github.com> 2024-03-01 10:08:05 +0100
commit96484d22a145fdef1d9002dc323f02e3b8ed2135 (patch)
tree0145aad050e55374ed0beae0edbc7556c0def7dd
parent4b29e666b06762b4b36438c9370c38bc43121f78 (diff)
Minz remove use of deprecated variable (#6132)
and related improvements to clarify inheritance Follow-up of https://github.com/FreshRSS/FreshRSS/pull/6130
-rw-r--r--app/FreshRSS.php2
-rw-r--r--app/Models/ActionController.php6
-rw-r--r--lib/Minz/ActionController.php2
-rw-r--r--lib/Minz/Dispatcher.php2
4 files changed, 7 insertions, 5 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 1e172c165..f41ff5d2e 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -23,8 +23,6 @@ class FreshRSS extends Minz_FrontController {
Minz_Session::init('FreshRSS');
}
- Minz_ActionController::$defaultViewType = FreshRSS_View::class;
-
FreshRSS_Context::initSystem();
if (!FreshRSS_Context::hasSystemConf()) {
$message = 'Error during context system init!';
diff --git a/app/Models/ActionController.php b/app/Models/ActionController.php
index 69ee72b52..27fdfa44d 100644
--- a/app/Models/ActionController.php
+++ b/app/Models/ActionController.php
@@ -1,10 +1,14 @@
<?php
declare(strict_types=1);
-class FreshRSS_ActionController extends Minz_ActionController {
+abstract class FreshRSS_ActionController extends Minz_ActionController {
/**
* @var FreshRSS_View
*/
protected $view;
+
+ public function __construct(string $viewType = '') {
+ parent::__construct($viewType === '' ? FreshRSS_View::class : $viewType);
+ }
}
diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php
index 65771aa62..809a52337 100644
--- a/lib/Minz/ActionController.php
+++ b/lib/Minz/ActionController.php
@@ -9,7 +9,7 @@ declare(strict_types=1);
/**
* The Minz_ActionController class is a controller in the MVC paradigm
*/
-class Minz_ActionController {
+abstract class Minz_ActionController {
/** @var array<string,string> */
private static array $csp_default = [
diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php
index d5a1d7eb2..c8825df61 100644
--- a/lib/Minz/Dispatcher.php
+++ b/lib/Minz/Dispatcher.php
@@ -10,7 +10,7 @@ declare(strict_types=1);
* The Dispatcher is in charge of initialising the Controller and exectue the action as specified in the Request object.
* It is a singleton.
*/
-class Minz_Dispatcher {
+final class Minz_Dispatcher {
/**
* Singleton