-
Notifications
You must be signed in to change notification settings - Fork 46
/
phpstan.neon.dist
115 lines (106 loc) · 5.99 KB
/
phpstan.neon.dist
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
level: 6
checkMissingOverrideMethodAttribute: true
paths:
- .
excludePaths:
- vendor
ignoreErrors:
- '~^Unsafe usage of new static\(\)\.$~'
# relax strict rules
- '~^Only booleans are allowed in .+, .+ given( on the (left|right) side)?\.$~'
- '~^Variable (static )?(property access|method call) on .+\.$~'
# assign to generic callable property is broken https://github.com/phpstan/phpstan/issues/8964
-
path: '*'
identifier: assign.propertyType
message: '~^Property Atk4\\Data\\Model\\UserAction::\$(enabled|preview) .*Closure<.+ does not accept .*Closure\(.+\.$~'
count: 3
# https://github.com/phpstan/phpstan/issues/5551
-
path: 'src/*'
message: '~^(Static property Atk4\\Data\\Reference::\$analysingClosureMap \(Atk4\\Data\\Reference\\WeakAnalysingMap<list<mixed>, Closure, Atk4\\Data\\Model\|Atk4\\Data\\Persistence>\) does not accept Atk4\\Data\\Reference\\WeakAnalysingMap<array\|object, array\|object, object>\.|Static property Atk4\\Data\\Reference::\$analysingTheirModelMap \(Atk4\\Data\\Reference\\WeakAnalysingMap<array\{Atk4\\Data\\Persistence, array\|Atk4\\Data\\Model\|\(Closure\(Atk4\\Data\\Persistence, array<string, mixed>\): Atk4\\Data\\Model\), array\}, Atk4\\Data\\Model, Atk4\\Data\\Model\|Atk4\\Data\\Persistence>\) does not accept Atk4\\Data\\Reference\\WeakAnalysingMap<array\|object, array\|object, object>\.|Cannot call method assertIsInitialized\(\) on array\|object\.)$~'
count: 5
# fix https://github.com/phpstan/phpstan-deprecation-rules/issues/52 and https://github.com/phpstan/phpstan/issues/6444
-
path: '*'
identifier: staticMethod.deprecatedClass
message: '~^Call to method (getVarcharTypeDeclarationSQL|getClobTypeDeclarationSQL|getCreateIndexSQL|getCreateTableSQL|getCurrentDatabaseExpression|initializeDoctrineTypeMappings)\(\) of deprecated class Doctrine\\DBAL\\Platforms\\(PostgreSQLPlatform|SQLServerPlatform|AbstractPlatform):\nUse.+instead\.$~'
count: 6
# https://github.com/phpstan/phpstan-deprecation-rules/issues/75
-
path: '*'
identifier: method.deprecated
message: '~^Call to deprecated method getVarcharTypeDeclarationSQL\(\) of class AnonymousClass\w+:\nUse \{@link getStringTypeDeclarationSQL\(\)\} instead\.$~'
count: 1
# AbstractPlatform::getIdentitySequenceName() method is deprecated in DBAL 3.4+,
# in DBAL 4.0 OraclePlatform::getIdentitySequenceName() is protected and
# PostgreSQLPlatform::getIdentitySequenceName() is removed:
# https://github.com/doctrine/dbal/blob/3.5.1/src/Platforms/PostgreSQLPlatform.php#L611
# https://github.com/doctrine/dbal/blob/4.0.0-beta1/src/Platforms/PostgreSQLPlatform.php#L297
-
path: '*'
identifier: method.deprecated
message: '~^Call to deprecated method getIdentitySequenceName\(\) of class Doctrine\\DBAL\\Platforms\\(PostgreSQLPlatform|OraclePlatform)\.$~'
count: 3
# FC for DBAL 4.0, remove once DBAL 3.x support is dropped
-
path: '*'
identifier: class.nameCase
message: '~^Class Doctrine\\DBAL\\(Platforms\\SqlitePlatform|Schema\\SqliteSchemaManager) referenced with incorrect case: Doctrine\\DBAL\\(Platforms\\SQLitePlatform|Schema\\SQLiteSchemaManager)\.$~'
count: 24
# TODO these rules are generated, this ignores should be fixed in the code
# for src/Schema/TestCase.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::dsql\(\)\.$~'
# for src/Field/SqlExpressionField.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Model::expr\(\)\.$~'
# for src/Model.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::export\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::prepareIterator\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::action\(\)\.$~'
# for src/Model/ReferencesTrait.php (in context of class Atk4\Data\Model)
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference::refLink\(\)\.$~'
# for src/Persistence/Sql.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::expr\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::exprNow\(\)\.$~'
# for src/Reference/HasMany.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Model::dsql\(\)\.$~'
# for tests/FieldTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addTitle\(\)\.$~'
# for tests/JoinSqlTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addField\(\)\.$~'
# for tests/ReferenceSqlTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addFields\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference::addTitle\(\)\.$~'
# for tests/ScopeTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Tests\\SUser::expr\(\)\.$~'