-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathphpstan.neon.dist
72 lines (66 loc) · 4.78 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
parameters:
level: 6
paths:
- ./
excludePaths:
- cache/
- build/
- vendor/
# TODO review once we drop PHP 7.x support
treatPhpDocTypesAsCertain: false
# some extra rules
checkAlwaysTrueCheckTypeFunctionCall: true
checkAlwaysTrueInstanceof: true
checkAlwaysTrueStrictComparison: true
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
# TODO checkMissingClosureNativeReturnTypehintRule: true
reportMaybesInMethodSignatures: true
reportStaticMethodSignatures: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkMissingIterableValueType: false # TODO
ignoreErrors:
- '~^Unsafe usage of new static\(\)\.$~'
-
message: '~^Call to deprecated method getRawDataByTable\(\) of class Atk4\\Data\\Persistence\\Array_:~'
path: '*'
count: 2
# for Doctrine DBAL 2.x, remove the support once Doctrine ORM 2.10 is released
# see https://github.com/doctrine/orm/issues/8526
-
message: '~^(Call to an undefined method Doctrine\\DBAL\\Driver\\Connection::getWrappedConnection\(\)\.|Call to an undefined method Doctrine\\DBAL\\Connection::createSchemaManager\(\)\.|Call to an undefined static method Doctrine\\DBAL\\Exception::invalidPdoInstance\(\)\.|Call to method (getCreateTableSQL|getClobTypeDeclarationSQL|initializeCommentedDoctrineTypes)\(\) of deprecated class Doctrine\\DBAL\\Platforms\\\w+Platform:\n.+|Anonymous class extends deprecated class Doctrine\\DBAL\\Platforms\\(PostgreSQL94Platform|SQLServer2012Platform):\n.+|Call to deprecated method fetch(|All)\(\) of class Doctrine\\DBAL\\Result:\n.+|Call to deprecated method getSchemaManager\(\) of class Doctrine\\DBAL\\Connection:\n.+|Access to an undefined property Doctrine\\DBAL\\Driver\\PDO\\Connection::\$connection\.|Parameter #1 \$dsn of class Doctrine\\DBAL\\Driver\\PDO\\SQLSrv\\Connection constructor expects string, Doctrine\\DBAL\\Driver\\PDO\\Connection given\.|Method Atk4\\Data\\Persistence\\Sql\\Expression::execute\(\) should return Doctrine\\DBAL\\Result\|PDOStatement but returns bool\.|PHPDoc tag @return contains generic type Doctrine\\DBAL\\Schema\\AbstractSchemaManager<Doctrine\\DBAL\\Platforms\\AbstractPlatform> but class Doctrine\\DBAL\\Schema\\AbstractSchemaManager is not generic\.|Class Doctrine\\DBAL\\Platforms\\(MySqlPlatform|PostgreSqlPlatform) referenced with incorrect case: Doctrine\\DBAL\\Platforms\\(MySQLPlatform|PostgreSQLPlatform)\.)$~'
path: '*'
# count for DBAL 3.x matched in "src/Persistence/GenericPlatform.php" file
count: 39
# TODO these rules are generated, this ignores should be fixed in the code
# for src/Schema/TestCase.php
- '~^Access to an undefined property Atk4\\Data\\Persistence::\$connection\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::dsql\(\)\.$~'
# for src/Field/SqlExpressionField.php
- '~^Call to an undefined method Atk4\\Data\\Model::expr\(\)\.$~'
# for src/Model.php
- '~^Call to an undefined method Atk4\\Data\\Persistence::update\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::insert\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::export\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::prepareIterator\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::delete\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::action\(\)\.$~'
# for src/Model/ReferencesTrait.php (in context of class Atk4\Data\Model)
- '~^Call to an undefined method Atk4\\Data\\Reference::refLink\(\)\.$~'
# for src/Persistence/Sql.php
- '~^Call to an undefined method Atk4\\Data\\Persistence::expr\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::exprNow\(\)\.$~'
# for src/Persistence/Sql/Join.php
- '~^Call to an undefined method Atk4\\Data\\Persistence::initQuery\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Persistence::lastInsertId\(\)\.$~'
# for src/Reference/HasMany.php
- '~^Call to an undefined method Atk4\\Data\\Model::dsql\(\)\.$~'
# for tests/FieldTest.php
- '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addTitle\(\)\.$~'
# for tests/JoinSqlTest.php
- '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addField\(\)\.$~'
# for tests/ReferenceSqlTest.php
- '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addFields\(\)\.$~'
- '~^Call to an undefined method Atk4\\Data\\Reference::addTitle\(\)\.$~'
# for tests/ScopeTest.php
- '~^Call to an undefined method Atk4\\Data\\Tests\\SUser::expr\(\)\.$~'