phpstan.yml 912 B

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