File tree 1 file changed +12
-13
lines changed
1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,24 @@ composer require --dev shipmonk/phpstan-baseline-per-identifier
35
35
> [ !IMPORTANT]
36
36
> _ This usage is available since version 2.0. See legacy usage below if you are still using PHPStan 1.x_
37
37
38
- Setup baselines loader, other files will be placed beside that file:
39
- ``` neon
40
- # phpstan.neon.dist
41
- includes:
42
- - baselines/loader.neon # instead of traditional phpstan-baseline.neon
38
+ Remove old single baseline include:
39
+ ``` diff
40
+ - includes:
41
+ - - phpstan-baseline.neon
43
42
```
44
43
45
- Run native baseline generation and split it into multiple files via our script:
44
+ Run native baseline generation and split it into multiple files via our script (other baseline files will be placed beside the loader) :
46
45
``` sh
47
46
vendor/bin/phpstan --generate-baseline=baselines/loader.neon && vendor/bin/split-phpstan-baseline baselines/loader.neon
48
47
```
49
48
49
+ Setup the baselines loader:
50
+ ``` neon
51
+ # phpstan.neon.dist
52
+ includes:
53
+ - baselines/loader.neon
54
+ ```
55
+
50
56
_ (optional)_ You can simplify generation with e.g. composer script:
51
57
``` json
52
58
{
@@ -99,10 +105,3 @@ Prepare composer script to simplify generation:
99
105
## PHP Baseline
100
106
- If the loader file extension is php, the generated files will be php files as well
101
107
102
- ## Migrating from single baseline
103
-
104
- 1 . ` rm phpstan-baseline.neon ` (and remove its include from ` phpstan.neon.dist ` )
105
- 2 . ` mkdir baselines `
106
- 3 . ` touch baselines/loader.neon ` (and include it in ` phpstan.neon.dist ` )
107
- 4 . Run the split script from above
108
-
You can’t perform that action at this time.
0 commit comments