Skip to content

Commit 36ff261

Browse files
committed
fix: phpstan.yml
1 parent 6b88d13 commit 36ff261

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

.github/workflows/phpstan.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
name: PHPStan
22

33
on:
4+
workflow_dispatch:
45
push:
5-
paths:
6-
- '**.php'
7-
- 'phpstan.neon.dist'
6+
branches-ignore:
7+
- 'dependabot/npm_and_yarn/*'
88

99
jobs:
1010
phpstan:
11-
name: phpstan
12-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
php: [8.3]
16+
1317
steps:
14-
- uses: actions/checkout@v4
18+
19+
- name: Checkout code
20+
uses: actions/checkout@v4
1521

1622
- name: Setup PHP
1723
uses: shivammathur/setup-php@v2
1824
with:
19-
php-version: '8.1'
20-
coverage: none
25+
php-version: ${{ matrix.php }}
26+
27+
- name: Get composer cache directory
28+
id: composer-cache
29+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
30+
31+
- name: Cache Composer dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ steps.composer-cache.outputs.dir }}
35+
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
2137

22-
- name: Install composer dependencies
23-
uses: ramsey/composer-install@v3
38+
- name: Install Dependencies
39+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
2440

25-
- name: Run PHPStan
26-
run: ./vendor/bin/phpstan --error-format=github
41+
- name: Run analysis
42+
run: ./vendor/bin/phpstan analyse --error-format=github

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"require-dev": {
4040
"guzzlehttp/guzzle": "^7.0",
41-
"larastan/larastan": "^2.9",
41+
"larastan/larastan": "^2.9|^3.0",
4242
"laravel/pint": "^1.0",
4343
"nunomaduro/collision": "^7.9",
4444
"orchestra/testbench": "^8.0",
@@ -52,8 +52,7 @@
5252
},
5353
"autoload": {
5454
"psr-4": {
55-
"Native\\Laravel\\": "src/",
56-
"Native\\Laravel\\Database\\Factories\\": "database/factories/"
55+
"Native\\Laravel\\": "src/"
5756
}
5857
},
5958
"autoload-dev": {

0 commit comments

Comments
 (0)