generated from PartridgeRocks/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.32 KB
/
phpstan.yml
File metadata and controls
42 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: PHPStan
on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
- '.github/workflows/phpstan.yml'
jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd
coverage: none
- name: Install composer dependencies
run: |
# Use Laravel 11 for static analysis since it's more stable with PHPStan
composer require "laravel/framework:^11.0" --no-interaction --no-update
# Allow flexible larastan version for compatibility
composer require --dev "larastan/larastan:^2.0" --no-interaction --no-update
# Fix collision dependency for Laravel compatibility
composer require --dev "nunomaduro/collision:^7.0||^8.0" --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction
- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
env:
GITHUB_TOKEN: dummy-token-for-static-analysis