Skip to content

Commit 2c01dac

Browse files
authored
Merge pull request #12072 from greg0ire/update-baseline
Update baseline because of doctrine/dbal 4.3.0
2 parents f38ee09 + 137ecb4 commit 2c01dac

File tree

3 files changed

+171
-94
lines changed

3 files changed

+171
-94
lines changed

phpstan-baseline.neon

Lines changed: 121 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,51 +1333,45 @@ parameters:
13331333
path: src/Mapping/Driver/AttributeDriver.php
13341334

13351335
-
1336-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:\:getReferencedColumnNames\(\)\.$#'
1337-
identifier: method.notFound
1338-
count: 1
1339-
path: src/Mapping/Driver/DatabaseDriver.php
1340-
1341-
-
1342-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:\:getReferencedTableName\(\)\.$#'
1343-
identifier: method.notFound
1336+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Schema\\\\ForeignKeyConstraint'' and ''getReferencedColumn…'' will always evaluate to true\.$#'
1337+
identifier: function.alreadyNarrowedType
13441338
count: 1
13451339
path: src/Mapping/Driver/DatabaseDriver.php
13461340

13471341
-
1348-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:\:getReferencingColumnNames\(\)\.$#'
1349-
identifier: method.notFound
1342+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Schema\\\\ForeignKeyConstraint'' and ''getReferencedTableN…'' will always evaluate to true\.$#'
1343+
identifier: function.alreadyNarrowedType
13501344
count: 1
13511345
path: src/Mapping/Driver/DatabaseDriver.php
13521346

13531347
-
1354-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\Index\:\:getIndexedColumns\(\)\.$#'
1355-
identifier: method.notFound
1348+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Schema\\\\ForeignKeyConstraint'' and ''getReferencingColum…'' will always evaluate to true\.$#'
1349+
identifier: function.alreadyNarrowedType
13561350
count: 1
13571351
path: src/Mapping/Driver/DatabaseDriver.php
13581352

13591353
-
1360-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\Table\:\:getPrimaryKeyConstraint\(\)\.$#'
1361-
identifier: method.notFound
1354+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Schema\\\\Index'' and ''getIndexedColumns'' will always evaluate to true\.$#'
1355+
identifier: function.alreadyNarrowedType
13621356
count: 1
13631357
path: src/Mapping/Driver/DatabaseDriver.php
13641358

13651359
-
1366-
message: '#^Call to method getColumnName\(\) on an unknown class Doctrine\\DBAL\\Schema\\Index\\IndexedColumn\.$#'
1367-
identifier: class.notFound
1360+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Schema\\\\Table'' and ''getPrimaryKeyConstr…'' will always evaluate to true\.$#'
1361+
identifier: function.alreadyNarrowedType
13681362
count: 1
13691363
path: src/Mapping/Driver/DatabaseDriver.php
13701364

13711365
-
1372-
message: '#^Call to method getColumnNames\(\) on an unknown class Doctrine\\DBAL\\Schema\\PrimaryKeyConstraint\.$#'
1373-
identifier: class.notFound
1366+
message: '#^Call to function method_exists\(\) with Doctrine\\DBAL\\Schema\\Index and ''getType'' will always evaluate to true\.$#'
1367+
identifier: function.alreadyNarrowedType
13741368
count: 1
13751369
path: src/Mapping/Driver/DatabaseDriver.php
13761370

13771371
-
1378-
message: '#^Call to method toString\(\) on an unknown class Doctrine\\DBAL\\Schema\\Name\\UnqualifiedName\.$#'
1379-
identifier: class.notFound
1380-
count: 5
1372+
message: '#^Call to function method_exists\(\) with Doctrine\\DBAL\\Schema\\Table and ''getPrimaryKeyConstr…'' will always evaluate to true\.$#'
1373+
identifier: function.alreadyNarrowedType
1374+
count: 2
13811375
path: src/Mapping/Driver/DatabaseDriver.php
13821376

13831377
-
@@ -1386,18 +1380,6 @@ parameters:
13861380
count: 1
13871381
path: src/Mapping/Driver/DatabaseDriver.php
13881382

1389-
-
1390-
message: '#^Class Doctrine\\DBAL\\Schema\\Index\\IndexType not found\.$#'
1391-
identifier: class.notFound
1392-
count: 1
1393-
path: src/Mapping/Driver/DatabaseDriver.php
1394-
1395-
-
1396-
message: '#^Class Doctrine\\DBAL\\Schema\\PrimaryKeyConstraint not found\.$#'
1397-
identifier: class.notFound
1398-
count: 1
1399-
path: src/Mapping/Driver/DatabaseDriver.php
1400-
14011383
-
14021384
message: '#^Instanceof between Doctrine\\ORM\\Mapping\\ClassMetadata\<T of object\> and Doctrine\\ORM\\Mapping\\ClassMetadata will always evaluate to true\.$#'
14031385
identifier: instanceof.alwaysTrue
@@ -1434,30 +1416,12 @@ parameters:
14341416
count: 2
14351417
path: src/Mapping/Driver/DatabaseDriver.php
14361418

1437-
-
1438-
message: '#^Parameter \#1 \$array of function sort contains unresolvable type\.$#'
1439-
identifier: argument.unresolvableType
1440-
count: 1
1441-
path: src/Mapping/Driver/DatabaseDriver.php
1442-
14431419
-
14441420
message: '#^Parameter \#2 \$columnName of method Doctrine\\ORM\\Mapping\\Driver\\DatabaseDriver\:\:getFieldNameForColumn\(\) expects string, string\|false given\.$#'
14451421
identifier: argument.type
14461422
count: 4
14471423
path: src/Mapping/Driver/DatabaseDriver.php
14481424

1449-
-
1450-
message: '#^Parameter \$indexedColumn of anonymous function has invalid type Doctrine\\DBAL\\Schema\\Index\\IndexedColumn\.$#'
1451-
identifier: class.notFound
1452-
count: 1
1453-
path: src/Mapping/Driver/DatabaseDriver.php
1454-
1455-
-
1456-
message: '#^Parameter \$name of anonymous function has invalid type Doctrine\\DBAL\\Schema\\Name\\UnqualifiedName\.$#'
1457-
identifier: class.notFound
1458-
count: 5
1459-
path: src/Mapping/Driver/DatabaseDriver.php
1460-
14611425
-
14621426
message: '#^Method Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver\:\:__construct\(\) has parameter \$fileExtension with no type specified\.$#'
14631427
identifier: missingType.parameter
@@ -2022,6 +1986,12 @@ parameters:
20221986
count: 1
20231987
path: src/Persisters/Collection/OneToManyPersister.php
20241988

1989+
-
1990+
message: '#^Parameter \#1 \$columns of method Doctrine\\DBAL\\Platforms\\AbstractPlatform\:\:getColumnDeclarationListSQL\(\) expects list\<array\{name\: string, type\: Doctrine\\DBAL\\Types\\Type, default\: mixed, notnull\?\: bool, autoincrement\: bool, columnDefinition\: non\-empty\-string\|null, comment\: string, charset\?\: non\-empty\-string\|null, \.\.\.\}\>, array\<string, array\{name\: string, notnull\: true, type\: Doctrine\\DBAL\\Types\\Type\}\> given\.$#'
1991+
identifier: argument.type
1992+
count: 1
1993+
path: src/Persisters/Collection/OneToManyPersister.php
1994+
20251995
-
20261996
message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\AbstractEntityInheritancePersister\:\:getSelectColumnSQL\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#'
20271997
identifier: missingType.generics
@@ -2610,6 +2580,12 @@ parameters:
26102580
count: 1
26112581
path: src/Query/Exec/MultiTableDeleteExecutor.php
26122582

2583+
-
2584+
message: '#^Parameter \#1 \$columns of method Doctrine\\DBAL\\Platforms\\AbstractPlatform\:\:getColumnDeclarationListSQL\(\) expects list\<array\{name\: string, type\: Doctrine\\DBAL\\Types\\Type, default\: mixed, notnull\?\: bool, autoincrement\: bool, columnDefinition\: non\-empty\-string\|null, comment\: string, charset\?\: non\-empty\-string\|null, \.\.\.\}\>, array\<string, array\{name\: string, notnull\: true, type\: Doctrine\\DBAL\\Types\\Type\}\> given\.$#'
2585+
identifier: argument.type
2586+
count: 1
2587+
path: src/Query/Exec/MultiTableDeleteExecutor.php
2588+
26132589
-
26142590
message: '#^Argument of an invalid type list\<string\>\|string supplied for foreach, only iterables are supported\.$#'
26152591
identifier: foreach.nonIterable
@@ -2622,6 +2598,12 @@ parameters:
26222598
count: 1
26232599
path: src/Query/Exec/MultiTableUpdateExecutor.php
26242600

2601+
-
2602+
message: '#^Parameter \#1 \$columns of method Doctrine\\DBAL\\Platforms\\AbstractPlatform\:\:getColumnDeclarationListSQL\(\) expects list\<array\{name\: string, type\: Doctrine\\DBAL\\Types\\Type, default\: mixed, notnull\?\: bool, autoincrement\: bool, columnDefinition\: non\-empty\-string\|null, comment\: string, charset\?\: non\-empty\-string\|null, \.\.\.\}\>, array\<string, array\{name\: string, notnull\: true, type\: Doctrine\\DBAL\\Types\\Type\}\> given\.$#'
2603+
identifier: argument.type
2604+
count: 1
2605+
path: src/Query/Exec/MultiTableUpdateExecutor.php
2606+
26252607
-
26262608
message: '#^Parameter \#3 \$types of method Doctrine\\DBAL\\Connection\:\:executeStatement\(\) expects array\<int\<0, max\>\|string, Doctrine\\DBAL\\ArrayParameterType\|Doctrine\\DBAL\\ParameterType\|Doctrine\\DBAL\\Types\\Type\|string\>, list\<Doctrine\\DBAL\\ArrayParameterType\|Doctrine\\DBAL\\ParameterType\|Doctrine\\DBAL\\Types\\Type\|int\|string\> given\.$#'
26272609
identifier: argument.type
@@ -3121,68 +3103,89 @@ parameters:
31213103
path: src/Tools/SchemaTool.php
31223104

31233105
-
3124-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:\:getReferencedColumnNames\(\)\.$#'
3125-
identifier: method.notFound
3106+
message: '''
3107+
#^Call to deprecated method getColumns\(\) of class Doctrine\\DBAL\\Schema\\Index\:
3108+
Use \{@see getIndexedColumns\(\)\} instead\.$#
3109+
'''
3110+
identifier: method.deprecated
31263111
count: 1
31273112
path: src/Tools/SchemaTool.php
31283113

31293114
-
3130-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:\:getReferencedTableName\(\)\.$#'
3131-
identifier: method.notFound
3132-
count: 1
3133-
path: src/Tools/SchemaTool.php
3115+
message: '''
3116+
#^Call to deprecated method getForeignColumns\(\) of class Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:
3117+
Use \{@see getReferencedColumnNames\(\)\} instead\.
31343118
3135-
-
3136-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:\:getReferencingColumnNames\(\)\.$#'
3137-
identifier: method.notFound
3119+
Returns the names of the referenced table columns
3120+
the foreign key constraint is associated with\.$#
3121+
'''
3122+
identifier: method.deprecated
31383123
count: 1
31393124
path: src/Tools/SchemaTool.php
31403125

31413126
-
3142-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\Index\:\:getIndexedColumns\(\)\.$#'
3143-
identifier: method.notFound
3127+
message: '''
3128+
#^Call to deprecated method getForeignTableName\(\) of class Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:
3129+
Use \{@see getReferencedTableName\(\)\} instead\.
3130+
3131+
Returns the name of the referenced table
3132+
the foreign key constraint is associated with\.$#
3133+
'''
3134+
identifier: method.deprecated
31443135
count: 1
31453136
path: src/Tools/SchemaTool.php
31463137

31473138
-
3148-
message: '#^Call to an undefined method Doctrine\\DBAL\\Schema\\Table\:\:dropForeignKey\(\)\.$#'
3149-
identifier: method.notFound
3139+
message: '''
3140+
#^Call to deprecated method getLocalColumns\(\) of class Doctrine\\DBAL\\Schema\\ForeignKeyConstraint\:
3141+
Use \{@see getReferencingColumnNames\(\)\} instead\.$#
3142+
'''
3143+
identifier: method.deprecated
31503144
count: 1
31513145
path: src/Tools/SchemaTool.php
31523146

31533147
-
3154-
message: '#^Call to function is_numeric\(\) with int\<0, max\> will always evaluate to true\.$#'
3155-
identifier: function.alreadyNarrowedType
3148+
message: '''
3149+
#^Call to deprecated method getPrimaryKey\(\) of class Doctrine\\DBAL\\Schema\\Table\:
3150+
Use \{@see getPrimaryKeyConstraint\(\)\} instead\.$#
3151+
'''
3152+
identifier: method.deprecated
31563153
count: 1
31573154
path: src/Tools/SchemaTool.php
31583155

31593156
-
3160-
message: '#^Call to method getColumnName\(\) on an unknown class Doctrine\\DBAL\\Schema\\Index\\IndexedColumn\.$#'
3161-
identifier: class.notFound
3157+
message: '''
3158+
#^Call to deprecated method removeForeignKey\(\) of class Doctrine\\DBAL\\Schema\\Table\:
3159+
Use \{@link dropForeignKey\(\)\} instead\.$#
3160+
'''
3161+
identifier: method.deprecated
31623162
count: 1
31633163
path: src/Tools/SchemaTool.php
31643164

31653165
-
3166-
message: '#^Call to method getColumnNames\(\) on an unknown class Doctrine\\DBAL\\Schema\\PrimaryKeyConstraint\.$#'
3167-
identifier: class.notFound
3166+
message: '''
3167+
#^Call to deprecated method setPrimaryKey\(\) of class Doctrine\\DBAL\\Schema\\Table\:
3168+
Use \{@see addPrimaryKeyConstraint\(\)\} instead\.$#
3169+
'''
3170+
identifier: method.deprecated
31683171
count: 1
31693172
path: src/Tools/SchemaTool.php
31703173

31713174
-
3172-
message: '#^Call to method toString\(\) on an unknown class Doctrine\\DBAL\\Schema\\Name\\UnqualifiedName\.$#'
3173-
identifier: class.notFound
3174-
count: 3
3175+
message: '#^Call to function is_numeric\(\) with int\<0, max\> will always evaluate to true\.$#'
3176+
identifier: function.alreadyNarrowedType
3177+
count: 1
31753178
path: src/Tools/SchemaTool.php
31763179

31773180
-
3178-
message: '#^Class Doctrine\\DBAL\\Schema\\PrimaryKeyConstraint not found\.$#'
3179-
identifier: class.notFound
3181+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Schema\\\\Index'' and ''getIndexedColumns'' will always evaluate to true\.$#'
3182+
identifier: function.alreadyNarrowedType
31803183
count: 1
31813184
path: src/Tools/SchemaTool.php
31823185

31833186
-
3184-
message: '#^Method Doctrine\\DBAL\\Schema\\AbstractSchemaManager\<Doctrine\\DBAL\\Platforms\\AbstractPlatform\>\:\:createComparator\(\) invoked with 1 parameter, 0 required\.$#'
3185-
identifier: arguments.count
3187+
message: '#^Call to function method_exists\(\) with Doctrine\\DBAL\\Schema\\Table and ''getPrimaryKeyConstr…'' will always evaluate to true\.$#'
3188+
identifier: function.alreadyNarrowedType
31863189
count: 1
31873190
path: src/Tools/SchemaTool.php
31883191

@@ -3289,15 +3292,51 @@ parameters:
32893292
path: src/Tools/SchemaTool.php
32903293

32913294
-
3292-
message: '#^Parameter \$indexedColumn of anonymous function has invalid type Doctrine\\DBAL\\Schema\\Index\\IndexedColumn\.$#'
3293-
identifier: class.notFound
3295+
message: '#^Parameter \#1 \$columnNames of method Doctrine\\DBAL\\Schema\\Table\:\:addIndex\(\) expects non\-empty\-list\<string\>, list\<string\> given\.$#'
3296+
identifier: argument.type
32943297
count: 1
32953298
path: src/Tools/SchemaTool.php
32963299

32973300
-
3298-
message: '#^Parameter \$name of anonymous function has invalid type Doctrine\\DBAL\\Schema\\Name\\UnqualifiedName\.$#'
3299-
identifier: class.notFound
3300-
count: 3
3301+
message: '#^Parameter \#1 \$columnNames of method Doctrine\\DBAL\\Schema\\Table\:\:addUniqueIndex\(\) expects non\-empty\-list\<string\>, array\<string\> given\.$#'
3302+
identifier: argument.type
3303+
count: 1
3304+
path: src/Tools/SchemaTool.php
3305+
3306+
-
3307+
message: '#^Parameter \#1 \$columnNames of method Doctrine\\DBAL\\Schema\\Table\:\:setPrimaryKey\(\) expects non\-empty\-list\<string\>, array\<string\> given\.$#'
3308+
identifier: argument.type
3309+
count: 1
3310+
path: src/Tools/SchemaTool.php
3311+
3312+
-
3313+
message: '#^Parameter \#1 \$value of static method Doctrine\\DBAL\\Schema\\Name\\Identifier\:\:unquoted\(\) expects non\-empty\-string, string given\.$#'
3314+
identifier: argument.type
3315+
count: 1
3316+
path: src/Tools/SchemaTool.php
3317+
3318+
-
3319+
message: '#^Parameter \#2 \$columnNames of class Doctrine\\DBAL\\Schema\\PrimaryKeyConstraint constructor expects non\-empty\-list\<Doctrine\\DBAL\\Schema\\Name\\UnqualifiedName\>, list\<Doctrine\\DBAL\\Schema\\Name\\UnqualifiedName\> given\.$#'
3320+
identifier: argument.type
3321+
count: 1
3322+
path: src/Tools/SchemaTool.php
3323+
3324+
-
3325+
message: '#^Parameter \#2 \$columns of class Doctrine\\DBAL\\Schema\\Index constructor expects non\-empty\-list\<string\>, list\<string\> given\.$#'
3326+
identifier: argument.type
3327+
count: 1
3328+
path: src/Tools/SchemaTool.php
3329+
3330+
-
3331+
message: '#^Parameter \#2 \$localColumnNames of method Doctrine\\DBAL\\Schema\\Table\:\:addForeignKeyConstraint\(\) expects non\-empty\-list\<string\>, list\<string\> given\.$#'
3332+
identifier: argument.type
3333+
count: 1
3334+
path: src/Tools/SchemaTool.php
3335+
3336+
-
3337+
message: '#^Parameter \#3 \$foreignColumnNames of method Doctrine\\DBAL\\Schema\\Table\:\:addForeignKeyConstraint\(\) expects non\-empty\-list\<string\>, list\<string\> given\.$#'
3338+
identifier: argument.type
3339+
count: 1
33013340
path: src/Tools/SchemaTool.php
33023341

33033342
-

phpstan-dbal3.neon

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,58 @@ parameters:
3434
message: '~^Call to an undefined method Doctrine\\DBAL\\Schema\\Table::addPrimaryKeyConstraint\(\)\.$~'
3535
path: src/Tools/SchemaTool.php
3636

37+
-
38+
message: '~^Call to an undefined method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint::get.*\.$~'
39+
identifier: method.notFound
40+
41+
-
42+
message: '~createComparator~'
43+
identifier: arguments.count
44+
45+
-
46+
message: '~UnqualifiedName~'
47+
identifier: class.notFound
48+
49+
-
50+
message: '~IndexedColumn~'
51+
identifier: class.notFound
52+
53+
-
54+
message: '~PrimaryKeyConstraint~'
55+
identifier: class.notFound
56+
57+
-
58+
message: '~IndexType~'
59+
identifier: class.notFound
60+
61+
-
62+
message: '~dropForeignKey~'
63+
identifier: method.notFound
64+
65+
-
66+
message: '~getIndexedColumns~'
67+
identifier: method.notFound
68+
69+
-
70+
message: '~getPrimaryKeyConstraint~'
71+
identifier: method.notFound
72+
73+
-
74+
message: '~PrimaryKeyConstraint~'
75+
identifier: class.notFound
76+
path: src/Tools/SchemaTool.php
77+
78+
-
79+
message: '~^Call to method toString.*UnqualifiedName\.$~'
80+
path: src/Tools/SchemaTool.php
81+
3782
- '~^Class Doctrine\\DBAL\\Platforms\\SQLitePlatform not found\.$~'
3883

84+
-
85+
message: '~sort~'
86+
identifier: argument.unresolvableType
87+
path: src/Mapping/Driver/DatabaseDriver.php
88+
3989
# To be removed in 4.0
4090
-
4191
message: '#Negated boolean expression is always false\.#'

0 commit comments

Comments
 (0)