Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
- name: Check that nothing has changed
run: git diff --exit-code

psalm:
code-analysis-phpstan:
runs-on: ubuntu-latest
name: Psalm static analysis
name: PHPStan static analysis
steps:
- uses: actions/checkout@v4

Expand All @@ -63,7 +63,7 @@ jobs:

- name: Run code analysis
run: |
task --yes code-analysis:psalm
task --yes code-analysis:phpstan

apispec:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@
###< vincentlanglet/twig-cs-fixer ###

.phpunit.cache

###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See [keep a changelog] for information about writing changes to this log.
- Added simple API tests and resolved some deprecations
- Upgraded to API platform v4
- Updated composer packages (security update) and recipes
- Replaces [Psalm](https://psalm.dev/) with [PHPStan](https://phpstan.org/) (via
<https://github.com/phpstan/phpstan-symfony>).

## [1.1.1] - 2025-03-28

Expand Down
18 changes: 12 additions & 6 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vars:
DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}'

# We're not yet ready to normalize config files …
YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml}"
YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml} phpstan.dist.neon"

tasks:
site:update:
Expand Down Expand Up @@ -163,7 +163,7 @@ tasks:
cmds:
- task: compose
vars:
COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --write
COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --write
silent: true

coding-standards:yaml:check:
Expand All @@ -172,15 +172,21 @@ tasks:
- task: coding-standards:yaml:apply
- task: compose
vars:
COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --check
COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --check
silent: true

code-analysis:psalm:
desc: "Run PSalm"
code-analysis:
desc: "Run code analysis"
cmds:
- task: code-analysis:phpstan
silent: true

code-analysis:phpstan:
desc: "Run PHPStan"
cmds:
- task: compose
vars:
COMPOSE_ARGS: exec phpfpm vendor/bin/psalm --no-cache
COMPOSE_ARGS: exec phpfpm vendor/bin/phpstan
silent: true

apispec:export:
Expand Down
13 changes: 5 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@
"require-dev": {
"ergebnis/composer-normalize": "^2.47",
"friendsofphp/php-cs-fixer": "^3.40",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^10.5",
"psalm/plugin-symfony": "^5.1",
"symfony/browser-kit": "~6.4.0",
"symfony/maker-bundle": "^1.52",
"symfony/phpunit-bridge": "^7.3",
"symfony/stopwatch": "~6.4.0",
"symfony/web-profiler-bundle": "~6.4.0",
"vimeo/psalm": "^5.16",
"vincentlanglet/twig-cs-fixer": "^3.7",
"weirdan/doctrine-psalm-plugin": "^2.9"
"vincentlanglet/twig-cs-fixer": "^3.7"
},
"replace": {
"symfony/polyfill-ctype": "*",
Expand Down Expand Up @@ -70,14 +69,15 @@
"allow-plugins": {
"ergebnis/composer-normalize": true,
"php-http/discovery": true,
"phpstan/extension-installer": true,
"symfony/flex": true,
"symfony/runtime": true
},
"sort-packages": true
},
"extra": {
"symfony": {
"allow-contrib": false,
"allow-contrib": true,
"require": "6.4.*"
}
},
Expand All @@ -100,9 +100,6 @@
],
"coding-standards-check": [
"PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run"
],
"psalm": [
"./vendor/bin/psalm --no-cache"
]
}
}
Loading