Skip to content

Commit

Permalink
Run larastan on next level on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dmohns committed Dec 11, 2024
1 parent 6d21617 commit b466035
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/php_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/development/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion src/backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit b466035

Please sign in to comment.