Skip to content

Commit 06e607a

Browse files
staabmclxmstaab
andauthored
doctrine dbal: cover deprecated api (#117)
Co-authored-by: Markus Staab <[email protected]>
1 parent eb80741 commit 06e607a

File tree

2 files changed

+3
-86
lines changed

2 files changed

+3
-86
lines changed

.phpstan-dba.cache

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@
213213
'result' =>
214214
array (
215215
1 => NULL,
216-
2 => NULL,
217216
3 => NULL,
218217
),
219218
),
@@ -1076,90 +1075,6 @@
10761075
array (
10771076
),
10781077
)),
1079-
2 =>
1080-
PHPStan\Type\Constant\ConstantArrayType::__set_state(array(
1081-
'keyType' =>
1082-
PHPStan\Type\UnionType::__set_state(array(
1083-
'types' =>
1084-
array (
1085-
0 =>
1086-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1087-
'value' => 0,
1088-
)),
1089-
1 =>
1090-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1091-
'value' => 1,
1092-
)),
1093-
2 =>
1094-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1095-
'value' => 2,
1096-
)),
1097-
3 =>
1098-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1099-
'value' => 3,
1100-
)),
1101-
),
1102-
)),
1103-
'itemType' =>
1104-
PHPStan\Type\UnionType::__set_state(array(
1105-
'types' =>
1106-
array (
1107-
0 =>
1108-
PHPStan\Type\IntegerRangeType::__set_state(array(
1109-
'min' => -128,
1110-
'max' => 4294967295,
1111-
)),
1112-
1 =>
1113-
PHPStan\Type\StringType::__set_state(array(
1114-
)),
1115-
),
1116-
)),
1117-
'allArrays' => NULL,
1118-
'keyTypes' =>
1119-
array (
1120-
0 =>
1121-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1122-
'value' => 0,
1123-
)),
1124-
1 =>
1125-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1126-
'value' => 1,
1127-
)),
1128-
2 =>
1129-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1130-
'value' => 2,
1131-
)),
1132-
3 =>
1133-
PHPStan\Type\Constant\ConstantIntegerType::__set_state(array(
1134-
'value' => 3,
1135-
)),
1136-
),
1137-
'valueTypes' =>
1138-
array (
1139-
0 =>
1140-
PHPStan\Type\StringType::__set_state(array(
1141-
)),
1142-
1 =>
1143-
PHPStan\Type\IntegerRangeType::__set_state(array(
1144-
'min' => 0,
1145-
'max' => 4294967295,
1146-
)),
1147-
2 =>
1148-
PHPStan\Type\IntegerRangeType::__set_state(array(
1149-
'min' => -128,
1150-
'max' => 127,
1151-
)),
1152-
3 =>
1153-
PHPStan\Type\IntegerRangeType::__set_state(array(
1154-
'min' => -128,
1155-
'max' => 127,
1156-
)),
1157-
),
1158-
'nextAutoIndex' => 4,
1159-
'optionalKeys' =>
1160-
array (
1161-
),
1162-
)),
11631078
),
11641079
),
11651080
'SELECT email, adaid, gesperrt, freigabe1u1 FROM ada LIMIT 1' =>

config/dba.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ services:
1111
- 'Doctrine\DBAL\Connection::executeQuery'
1212
- 'Doctrine\DBAL\Connection::executeCacheQuery'
1313
- 'Doctrine\DBAL\Connection::executeStatement'
14+
- 'Doctrine\DBAL\Connection::executeUpdate' # deprecated in doctrine
1415

1516
-
1617
class: staabm\PHPStanDba\Rules\PdoStatementExecuteMethodRule
@@ -24,7 +25,8 @@ services:
2425
- 'PDO::query#0'
2526
- 'PDO::prepare#0'
2627
- 'mysqli::query#0'
27-
- 'Doctrine\DBAL\Connection::query#0'
28+
- 'Doctrine\DBAL\Connection::query#0' # deprecated in doctrine
29+
- 'Doctrine\DBAL\Connection::exec#0' # deprecated in doctrine
2830

2931
-
3032
class: staabm\PHPStanDba\Rules\SyntaxErrorInQueryFunctionRule

0 commit comments

Comments
 (0)