Skip to content

Commit 9730332

Browse files
committed
fix(ci): remove laravel/sail before linking reyemtech/sail, add PHPStan baseline
Fresh Laravel apps ship with laravel/sail which conflicts with reyemtech/sail. Remove it first before requiring the fork. Added PHPStan baseline for 8 pre-existing errors in upstream code so the self-contained static analysis workflow passes.
1 parent 6b58646 commit 9730332

4 files changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838

3939
- name: Link Sail repository
4040
run: |
41+
composer remove laravel/sail --dev --no-interaction -W
4142
composer config minimum-stability dev
4243
composer config repositories.sail path ../sail
4344
composer require reyemtech/sail:* --dev -W

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646

4747
- name: Link Sail repository
4848
run: |
49+
composer remove laravel/sail --dev --no-interaction -W
4950
composer config minimum-stability dev
5051
composer config repositories.sail path ../sail
5152
composer require reyemtech/sail:* --dev -W

phpstan-baseline.neon

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Method Laravel\\\\Sail\\\\Console\\\\AddCommand\\:\\:replaceEnvVariables\\(\\) invoked with 1 parameter, 2 required\\.$#"
5+
count: 1
6+
path: src/Console/AddCommand.php
7+
8+
-
9+
message: "#^Method Laravel\\\\Sail\\\\Console\\\\AddCommand\\:\\:runSetup\\(\\) should return string but return statement is missing\\.$#"
10+
count: 1
11+
path: src/Console/AddCommand.php
12+
13+
-
14+
message: "#^Method Laravel\\\\Sail\\\\Console\\\\BuildCommand\\:\\:choosePush\\(\\) should return array but return statement is missing\\.$#"
15+
count: 1
16+
path: src/Console/BuildCommand.php
17+
18+
-
19+
message: "#^Result of static method Illuminate\\\\Support\\\\Facades\\\\Config\\:\\:set\\(\\) \\(void\\) is used\\.$#"
20+
count: 1
21+
path: src/Console/BuildCommand.php
22+
23+
-
24+
message: "#^Method Laravel\\\\Sail\\\\Console\\\\HelmCommand\\:\\:choosePush\\(\\) should return array but return statement is missing\\.$#"
25+
count: 1
26+
path: src/Console/HelmCommand.php
27+
28+
-
29+
message: "#^Result of static method Illuminate\\\\Support\\\\Facades\\\\Config\\:\\:set\\(\\) \\(void\\) is used\\.$#"
30+
count: 1
31+
path: src/Console/HelmCommand.php
32+
33+
-
34+
message: "#^Method Laravel\\\\Sail\\\\Console\\\\InstallCommand\\:\\:runSetup\\(\\) should return string but return statement is missing\\.$#"
35+
count: 1
36+
path: src/Console/InstallCommand.php
37+
38+
-
39+
message: "#^Method Laravel\\\\Sail\\\\Console\\\\PublishCommand\\:\\:runSetup\\(\\) should return string but return statement is missing\\.$#"
40+
count: 1
41+
path: src/Console/PublishCommand.php

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
includes:
2+
- phpstan-baseline.neon
3+
14
parameters:
25
paths:
36
- src

0 commit comments

Comments
 (0)