Skip to content

Commit

Permalink
Merge pull request #5369 from nextcloud/enh/noid/psalm
Browse files Browse the repository at this point in the history
aio-interface: Improve psalm
  • Loading branch information
szaimen authored Oct 4, 2024
2 parents 72a1505 + 6e7f547 commit 09a3212
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 34 deletions.
1 change: 1 addition & 0 deletions php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
59 changes: 30 additions & 29 deletions php/composer.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
15 changes: 10 additions & 5 deletions php/psalm.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config"
errorBaseline="psalm-baseline.xml"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="templates"/>
<directory name="src"/>
<file name="public/index.php"/>
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<extraFiles>
<directory name="vendor" />
</extraFiles>
<issueHandlers>
</issueHandlers>
</psalm>

0 comments on commit 09a3212

Please sign in to comment.