phpstan.yml 803 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: "PHPStan"
  2. on:
  3. - push
  4. - pull_request
  5. permissions:
  6. contents: read
  7. env:
  8. COMPOSER_ROOT_VERSION: dev-main
  9. jobs:
  10. tests:
  11. name: "PHPStan"
  12. runs-on: ubuntu-latest
  13. strategy:
  14. matrix:
  15. php-version:
  16. - "8.1"
  17. - latest
  18. steps:
  19. - uses: actions/checkout@v4
  20. - uses: shivammathur/setup-php@v2
  21. with:
  22. php-version: "${{ matrix.php-version }}"
  23. coverage: none
  24. extensions: mongodb, redis, amqp
  25. - name: Add require for mongodb/mongodb to make tests runnable
  26. run: "composer require ${{ env.COMPOSER_FLAGS }} mongodb/mongodb --dev --no-update"
  27. - uses: ramsey/composer-install@v3
  28. with:
  29. dependency-versions: highest
  30. - name: Run PHPStan
  31. run: composer phpstan