Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 112 additions & 2 deletions .phpstan-dba-mysqli.cache

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .phpstan-dba-pdo-mysql.cache

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions tests/default/config/.phpunit-phpstan-dba-mysqli.cache

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions tests/default/config/.phpunit-phpstan-dba-pdo-mysql.cache

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/default/data/pdo-default-fetch-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function specifiedFetchTypes(PDO $pdo, string $q): void

$stmt = $pdo->query($q, PDO::FETCH_COLUMN);
foreach ($stmt as $row) {
assertType('array<int|string, mixed>', $row); // could be array<int|string, float|int|string|null>
assertType('mixed', $row); // could be array<int|string, float|int|string|null>
}
}
}
2 changes: 1 addition & 1 deletion tests/default/data/pdo-fetch-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function unsupportedFetchTypes(PDO $pdo)
{
$stmt = $pdo->query('SELECT email, adaid FROM ada', PDO::FETCH_COLUMN);
foreach ($stmt as $row) {
assertType('array<int|string, mixed>', $row);
assertType('mixed', $row);
}
}
}
5 changes: 3 additions & 2 deletions tests/default/data/pdo-prepare.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function noInferenceOnBug196(PDO $pdo, array $minorPhpVersions, \DateTime
{
$sumQueries = [];
$dataPointDate = $updateDate->format('Ymd');
foreach ($minorPhpVersions as $index => $version) {
foreach ($minorPhpVersions as $version) {
$sumQueries[] = 'SUM(DATA->\'$."'.$version.'"."'.$dataPointDate.'"\')';
}
$stmt = $pdo->prepare(
Expand All @@ -196,8 +196,9 @@ public function noInferenceOnBug196(PDO $pdo, array $minorPhpVersions, \DateTime

// this query is too dynamic for being analyzed.
// make sure we don't infer a wrong type.
assertType('PDOStatement', $stmt);
foreach ($stmt as $row) {
assertType('array<int|string, mixed>', $row);
assertType('mixed', $row);
}
}

Expand Down
30 changes: 15 additions & 15 deletions tests/sqlAst/config/.phpunit-phpstan-dba-mysqli.cache

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading