From 12eb77b79b325065e392f202ad133ba96524b857 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Wed, 11 Dec 2024 14:42:04 +0100 Subject: [PATCH] Run `larastan` on next level on CI (#410) --- .github/workflows/php_linter.yml | 9 +++++++-- docs/development/development-environment.md | 2 +- src/backend/composer.json | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php_linter.yml b/.github/workflows/php_linter.yml index 7c35ada40..c9d4d652a 100644 --- a/.github/workflows/php_linter.yml +++ b/.github/workflows/php_linter.yml @@ -35,10 +35,15 @@ jobs: run: composer php-cs-fixer-check working-directory: ./src/backend - - name: Run PHPStan - run: composer phpstan-analyse + - name: Run PHPStan/Larastan + run: composer larastan working-directory: ./src/backend + - name: Run PHPStan/Larastan (next level) + run: composer larastan-next + working-directory: ./src/backend + continue-on-error: true + # Temporarily disabled, until we can run it with php-parser version 5 # https://github.com/vimeo/psalm/issues/11112 # - name: Run Psalm diff --git a/docs/development/development-environment.md b/docs/development/development-environment.md index aeed6a76b..8b7864afa 100644 --- a/docs/development/development-environment.md +++ b/docs/development/development-environment.md @@ -113,7 +113,7 @@ Configurations for a different editor will work a like. ### Local PHP installation For local development and editor integration it can be helpful to have a local instance of PHP. -This will allow you to run composer scripts like `phpstan-analyse` without the need to use Docker. +This will allow you to run composer scripts like `larastan` without the need to use Docker. These steps are highly dependant on your system. diff --git a/src/backend/composer.json b/src/backend/composer.json index 57f1d2799..f97964c47 100644 --- a/src/backend/composer.json +++ b/src/backend/composer.json @@ -103,6 +103,7 @@ "php-cs-fixer-fix": "php-cs-fixer fix --diff", "php-cs-fixer-check": "php-cs-fixer check --diff", "php-cs-fixer-version": "php-cs-fixer --version", - "phpstan-analyse": "phpstan analyse --memory-limit=2G --no-progress" + "larastan": "phpstan analyse --memory-limit=2G --no-progress", + "larastan-next": "phpstan analyse --memory-limit=2G --no-progress --level=2" } }