From a85794b7dd7f769d33fc2094520d19c4632821ea Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 13 Aug 2026 11:21:15 +0200 Subject: [PATCH 1/3] refactor: Add type hinting to middleware Signed-off-by: Carl Schwan --- lib/Middleware/ExAppUIL10NMiddleware.php | 2 +- lib/Middleware/ExAppUiMiddleware.php | 8 ++++---- tests/psalm-baseline.xml | 8 -------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/Middleware/ExAppUIL10NMiddleware.php b/lib/Middleware/ExAppUIL10NMiddleware.php index 09a6a84b2..5f69a983b 100644 --- a/lib/Middleware/ExAppUIL10NMiddleware.php +++ b/lib/Middleware/ExAppUIL10NMiddleware.php @@ -38,7 +38,7 @@ public function __construct( ) { } - public function beforeOutput(Controller $controller, string $methodName, string $output) { + public function beforeOutput(Controller $controller, string $methodName, string $output): string { $url = $this->request->getRequestUri(); $loadL10N = false; foreach (self::routesToLoadL10N as $route) { diff --git a/lib/Middleware/ExAppUiMiddleware.php b/lib/Middleware/ExAppUiMiddleware.php index 158a8c0cc..9964e488b 100644 --- a/lib/Middleware/ExAppUiMiddleware.php +++ b/lib/Middleware/ExAppUiMiddleware.php @@ -26,14 +26,14 @@ public function __construct( ) { } - public function beforeOutput(Controller $controller, string $methodName, string $output) { + public function beforeOutput(Controller $controller, string $methodName, string $output): string { if (($controller instanceof TopMenuController) && ($controller->postprocess)) { - $output = preg_replace( + $output = (string)preg_replace( '/(href=")(\/.*?)(\/app_api\/css\/)(proxy\/.*css.*")/', '$1/index.php/apps/app_api/$4', $output); foreach ($controller->jsProxyMap as $key => $value) { - $output = preg_replace( + $output = (string)preg_replace( '/(src=")(\/.*?)(\/app_api\/js\/)(proxy_js\/' . (string)$key . '.js)(.*")/', '$1/index.php/apps/app_api/proxy/' . $value . '.js$5', $output, @@ -43,7 +43,7 @@ public function beforeOutput(Controller $controller, string $methodName, string return $output; } - public function afterController(Controller $controller, string $methodName, Response $response) { + public function afterController(Controller $controller, string $methodName, Response $response): Response { if (($controller instanceof TopMenuController) && ($controller->postprocess)) { $exAppId = $this->request->getParam('appId'); $menuEntryName = $this->request->getParam('name'); diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 1eb3124bb..e85149ee7 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -142,14 +142,6 @@ - - - - - - - - Date: Thu, 13 Aug 2026 11:21:54 +0200 Subject: [PATCH 2/3] fix: Port changeColumn to modifyColumn Signed-off-by: Carl Schwan --- lib/Migration/Version2000Date20240120094952.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Migration/Version2000Date20240120094952.php b/lib/Migration/Version2000Date20240120094952.php index bcc7badec..410877276 100644 --- a/lib/Migration/Version2000Date20240120094952.php +++ b/lib/Migration/Version2000Date20240120094952.php @@ -37,7 +37,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addUniqueIndex(['daemon_config_name', 'port'], 'ex_apps_c_port__idx'); $table = $schema->getTable('ex_apps_daemons'); - $table->changeColumn('deploy_config', [ + $table->modifyColumn('deploy_config', [ 'notnull' => true, ]); From fa0a32757858cbf5b2807f048ed21c877da3d289 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 13 Aug 2026 11:48:29 +0200 Subject: [PATCH 3/3] fix(psalm): ExAppOccService Signed-off-by: Carl Schwan --- lib/Service/ExAppOccService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/ExAppOccService.php b/lib/Service/ExAppOccService.php index d982b871b..6f54cb8d7 100644 --- a/lib/Service/ExAppOccService.php +++ b/lib/Service/ExAppOccService.php @@ -128,7 +128,7 @@ public function __construct( $this->service = $this->container->get(PublicFunctions::class); } - protected function configure() { + protected function configure(): void { $this->setName($this->occCommand->getName()); $this->setDescription($this->occCommand->getDescription()); $this->setHidden(filter_var($this->occCommand->getHidden(), FILTER_VALIDATE_BOOLEAN));