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
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
on: pull_request

name: Psalm
name: Code Analysis

jobs:
psalm:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.4"]
name: Psalm (PHP ${{ matrix.php }})
name: PHPStan (PHP ${{ matrix.php }})
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -33,7 +33,7 @@ jobs:
restore-keys: ${{ matrix.php }}-composer-

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Psalm
run: phpdbg -qrr ./vendor/bin/psalm
- name: PHPStan
run: vendor/bin/phpstan analyse --no-progress
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ All notable changes to this project will be documented in this file.
- Added BRND to feed source admin dropdown.
- Upgraded to PHP 8.4.
- Changed default CLIENT_PULL_STRATEGY_INTERVAL value to 10 minutes.
- Changed code analysis tool from psalm to phpstan.
- Changed src/Controller/Api/AuthOidcController.php to get session from request.

### NB! Prior to 3.x the project was split into separate repositories

Expand Down
25 changes: 22 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,29 @@ tasks:
cmds:
- task composer -- code-analysis

psalm:update-baseline:
desc: "Updates the Psalm baseline file."
phpstan:generate-baseline:
desc: "Generates the PHPStan baseline file."
cmds:
- task compose -- exec phpfpm vendor/bin/psalm --update-baseline
- task compose -- exec phpfpm vendor/bin/phpstan analyse --generate-baseline --no-progress

rector:apply:
desc: "Runs Rector."
cmds:
- task compose -- exec phpfpm vendor/bin/rector

rector:check:
desc: "Runs Rector in dry-run mode."
cmds:
- task compose -- exec phpfpm vendor/bin/rector --dry-run

run-checks-and-tests:
desc: "Runs all checks: coding standards, code analysis, rector, and tests."
cmds:
- task coding-standards:check
- task code-analysis
- task rector:check
- task test:api
- task test:frontend-local

fixtures:load:
prompt: "This will reset your content. Continue?"
Expand Down
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@
"ergebnis/composer-normalize": "^2.15",
"friendsofphp/php-cs-fixer": "^3.0",
"hautelook/alice-bundle": "^2.9",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-doctrine": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^9.5",
"psalm/plugin-symfony": "^5.3",
"rector/rector": "^1.0",
"rector/rector": "^2.4",
"symfony/browser-kit": "~6.4.0",
"symfony/css-selector": "~6.4.0",
"symfony/debug-bundle": "~6.4.0",
Expand All @@ -63,9 +66,7 @@
"symfony/stopwatch": "~6.4.0",
"symfony/var-dumper": "~6.4.0",
"symfony/web-profiler-bundle": "~6.4.0",
"vimeo/psalm": "^6.13.0",
"vincentlanglet/twig-cs-fixer": "^3.8",
"weirdan/doctrine-psalm-plugin": "^2.10"
"vincentlanglet/twig-cs-fixer": "^3.8"
},
"replace": {
"symfony/polyfill-ctype": "*",
Expand All @@ -92,6 +93,7 @@
"composer/package-versions-deprecated": true,
"ergebnis/composer-normalize": true,
"php-http/discovery": true,
"phpstan/extension-installer": true,
"symfony/flex": true,
"symfony/runtime": true
},
Expand Down Expand Up @@ -121,7 +123,7 @@
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"code-analysis": "vendor/bin/psalm --no-cache",
"code-analysis": "vendor/bin/phpstan analyse --no-progress",
"coding-standards-apply": [
"vendor/bin/php-cs-fixer fix"
],
Expand Down
Loading
Loading