From 0e99adeb94d137443a681e688b5e3a9ff3ec5918 Mon Sep 17 00:00:00 2001
From: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
Date: Wed, 2 Oct 2024 14:04:13 +0200
Subject: [PATCH 1/3] psalm.xml
Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
---
php/composer.json | 59 ++++++++++++++++++++++++-----------------------
php/psalm.xml | 16 +++++++++----
2 files changed, 41 insertions(+), 34 deletions(-)
diff --git a/php/composer.json b/php/composer.json
index 3ac4ea36220..17fa50977fc 100644
--- a/php/composer.json
+++ b/php/composer.json
@@ -1,35 +1,36 @@
{
- "autoload": {
- "psr-4": {
- "AIO\\": ["src/"]
- }
- },
- "require": {
- "php": "8.3.*",
- "ext-json": "*",
- "ext-sodium": "*",
- "ext-curl": "*",
- "slim/slim": "^4.11",
- "php-di/slim-bridge": "^3.3",
- "guzzlehttp/guzzle": "^7.5",
- "guzzlehttp/psr7": "^2.4",
- "http-interop/http-factory-guzzle": "^1.2",
- "slim/twig-view": "^3.3",
- "slim/csrf": "^1.3",
- "ext-apcu": "*"
- },
- "require-dev": {
- "sserbin/twig-linter": "@dev",
- "vimeo/psalm": "^5.25",
- "wapmorgan/php-deprecation-detector": "dev-master"
- },
- "scripts": {
- "dev": [
- "Composer\\Config::disableProcessTimeout",
- "php -S localhost:8080 -t public"
- ],
+ "autoload": {
+ "psr-4": {
+ "AIO\\": ["src/"]
+ }
+ },
+ "require": {
+ "php": "8.3.*",
+ "ext-json": "*",
+ "ext-sodium": "*",
+ "ext-curl": "*",
+ "slim/slim": "^4.11",
+ "php-di/slim-bridge": "^3.3",
+ "guzzlehttp/guzzle": "^7.5",
+ "guzzlehttp/psr7": "^2.4",
+ "http-interop/http-factory-guzzle": "^1.2",
+ "slim/twig-view": "^3.3",
+ "slim/csrf": "^1.3",
+ "ext-apcu": "*"
+ },
+ "require-dev": {
+ "sserbin/twig-linter": "@dev",
+ "vimeo/psalm": "^5.25",
+ "wapmorgan/php-deprecation-detector": "dev-master"
+ },
+ "scripts": {
+ "dev": [
+ "Composer\\Config::disableProcessTimeout",
+ "php -S localhost:8080 -t public"
+ ],
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --monochrome --no-progress --output-format=text --update-baseline",
+ "psalm:strict": "psalm --threads=1 --show-info=true",
"lint": "php -l src/*.php src/**/*.php public/index.php",
"lint:twig": "twig-linter lint ./templates",
"php-deprecation-detector": "phpdd scan -n -t 8.3 src/*.php src/**/*.php public/index.php"
diff --git a/php/psalm.xml b/php/psalm.xml
index 59601afad4e..e958843fa42 100644
--- a/php/psalm.xml
+++ b/php/psalm.xml
@@ -1,17 +1,23 @@
+
+
+
+
+
+
+
+
+
From eb7921c9f9d640d6c267108410e05496d15c25ac Mon Sep 17 00:00:00 2001
From: "Simon L."
Date: Fri, 4 Oct 2024 15:36:59 +0200
Subject: [PATCH 2/3] drop the comment - we know that we can improve the
errorlevel
Follow up already noted in https://github.com/nextcloud/all-in-one/issues/5368
Signed-off-by: Simon L.
---
php/psalm.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/php/psalm.xml b/php/psalm.xml
index e958843fa42..7a6ca595005 100644
--- a/php/psalm.xml
+++ b/php/psalm.xml
@@ -1,5 +1,4 @@
-
Date: Fri, 4 Oct 2024 15:38:35 +0200
Subject: [PATCH 3/3] add psalm:strict to the readme
Signed-off-by: Simon L.
---
php/README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/php/README.md b/php/README.md
index 285530f657f..29ade4ae7f6 100644
--- a/php/README.md
+++ b/php/README.md
@@ -56,6 +56,7 @@ Note: You can restart the server by preceding the command with other environment
|-----------------------------------------|----------------------------------------|
| `composer run dev` | Starts the development server |
| `composer run psalm` | Run Psalm static analysis |
+| `composer run psalm:strict` | Run Psalm static analysis strict |
| `composer run psalm:update-baseline` | Run Psalm with `--update-baseline` arg |
| `composer run lint` | Run PHP Syntax check |
| `composer run lint:twig` | Run Twig Syntax check |