Skip to content

Commit 69265b7

Browse files
committed
ci(configuration): Add new baseline and update dependencies
- Introduce disallowed.function.neon baseline to track specific errors - Update povils/phpmnd to version 3.6 - Upgrade symplify/phpstan-rules to version 14.4 - Add yamadashy/phpstan-friendly-formatter dependency - Modify PHPStan errorFormat to 'friendly' for better output
1 parent 596f5f3 commit 69265b7

File tree

4 files changed

+34
-34
lines changed

4 files changed

+34
-34
lines changed

baselines/disallowed.function.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# total 1 error
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Calling env\(\) is forbidden, use config\(\) instead\.$#'
7+
count: 1
8+
path: ../src/Support/helpers.php

baselines/loader.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# total 10 errors
12
includes:
3+
- disallowed.function.neon
24
- function.alreadyNarrowedType.neon
35
- method.notFound.neon
46
- nullCoalesce.variable.neon

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,16 @@
6262
"phpstan/phpstan": "^2.1",
6363
"phpstan/phpstan-deprecation-rules": "^2.0",
6464
"phpstan/phpstan-webmozart-assert": "^2.0",
65-
"povils/phpmnd": "^3.5",
65+
"povils/phpmnd": "^3.6",
6666
"rector/rector": "^2.0",
6767
"shipmonk/composer-dependency-analyser": "^1.8",
6868
"shipmonk/phpstan-baseline-per-identifier": "^2.1",
6969
"spatie/pest-plugin-snapshots": "^1.1 || ^2.0",
7070
"spaze/phpstan-disallowed-calls": "^4.4",
7171
"symplify/phpstan-extensions": "^12.0",
72-
"symplify/phpstan-rules": "^14.3",
73-
"tomasvotruba/type-coverage": "^2.0"
72+
"symplify/phpstan-rules": "^14.4",
73+
"tomasvotruba/type-coverage": "^2.0",
74+
"yamadashy/phpstan-friendly-formatter": "^1.2"
7475
},
7576
"suggest": {
7677
"laravel-lang/http-statuses": "Provide localized message for HTTP status code."

phpstan.neon

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,19 @@ includes:
2727

2828
parameters:
2929
paths:
30-
- config/
3130
- src/
3231
# - tests/
3332
excludePaths:
3433
- tests/Fixtures/
3534
level: max
3635
# level: 10
3736
tmpDir: .build/phpstan
38-
errorFormat: symplify
39-
# errorFormat: friendly
40-
# friendly:
41-
# lineBefore: 3
42-
# lineAfter: 3
43-
# editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
37+
# errorFormat: symplify
38+
errorFormat: friendly
39+
friendly:
40+
lineBefore: 3
41+
lineAfter: 3
42+
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
4443
type_coverage:
4544
declare: 100
4645
return_type: 100
@@ -58,27 +57,17 @@ parameters:
5857
function: 'env_getcsv()'
5958
message: 'use config() instead'
6059
ignoreErrors:
61-
- '#^Cannot call method .*\(\) on mixed\.$#'
62-
- '#^Cannot cast mixed to .*\.$#'
63-
- '#^Cannot use array destructuring on mixed\.$#'
64-
- '#Property .* does not accept mixed#'
65-
-
66-
identifier: argument.templateType
67-
-
68-
identifier: argument.type
69-
-
70-
identifier: missingType.generics
71-
-
72-
identifier: missingType.iterableValue
73-
-
74-
identifier: return.type
75-
-
76-
identifier: encapsedStringPart.nonString
77-
-
78-
identifier: logicalOr.resultUnused
79-
-
80-
identifier: new.static
81-
-
82-
message: '#^Calling env\(\) is forbidden, use config\(\) instead\.$#'
83-
count: 1
84-
path: ./src/Support/helpers.php
60+
- identifier: argument.templateType
61+
- identifier: argument.type
62+
- identifier: assign.propertyType
63+
- identifier: cast.double
64+
- identifier: cast.int
65+
- identifier: cast.string
66+
- identifier: encapsedStringPart.nonString
67+
- identifier: logicalOr.resultUnused
68+
- identifier: method.nonObject
69+
- identifier: missingType.generics
70+
- identifier: missingType.iterableValue
71+
- identifier: new.static
72+
- identifier: offsetAccess.nonArray
73+
- identifier: return.type

0 commit comments

Comments
 (0)