Skip to content

Commit 8cdd7b8

Browse files
authored
Fix build (#775)
1 parent 0ce0761 commit 8cdd7b8

9 files changed

+169
-38
lines changed

.phpstan-dba-mysqli.cache

Lines changed: 112 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.phpstan-dba-pdo-mysql.cache

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/default/config/.phpunit-phpstan-dba-mysqli.cache

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/default/config/.phpunit-phpstan-dba-pdo-mysql.cache

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/default/data/pdo-default-fetch-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function specifiedFetchTypes(PDO $pdo, string $q): void
4949

5050
$stmt = $pdo->query($q, PDO::FETCH_COLUMN);
5151
foreach ($stmt as $row) {
52-
assertType('array<int|string, mixed>', $row); // could be array<int|string, float|int|string|null>
52+
assertType('mixed', $row); // could be array<int|string, float|int|string|null>
5353
}
5454
}
5555
}

tests/default/data/pdo-fetch-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function unsupportedFetchTypes(PDO $pdo)
4040
{
4141
$stmt = $pdo->query('SELECT email, adaid FROM ada', PDO::FETCH_COLUMN);
4242
foreach ($stmt as $row) {
43-
assertType('array<int|string, mixed>', $row);
43+
assertType('mixed', $row);
4444
}
4545
}
4646
}

tests/default/data/pdo-prepare.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function noInferenceOnBug196(PDO $pdo, array $minorPhpVersions, \DateTime
186186
{
187187
$sumQueries = [];
188188
$dataPointDate = $updateDate->format('Ymd');
189-
foreach ($minorPhpVersions as $index => $version) {
189+
foreach ($minorPhpVersions as $version) {
190190
$sumQueries[] = 'SUM(DATA->\'$."'.$version.'"."'.$dataPointDate.'"\')';
191191
}
192192
$stmt = $pdo->prepare(
@@ -196,8 +196,9 @@ public function noInferenceOnBug196(PDO $pdo, array $minorPhpVersions, \DateTime
196196

197197
// this query is too dynamic for being analyzed.
198198
// make sure we don't infer a wrong type.
199+
assertType('PDOStatement', $stmt);
199200
foreach ($stmt as $row) {
200-
assertType('array<int|string, mixed>', $row);
201+
assertType('mixed', $row);
201202
}
202203
}
203204

tests/sqlAst/config/.phpunit-phpstan-dba-mysqli.cache

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)