Skip to content

Commit

Permalink
Merge pull request vimeo#10289 from ging-dev/add-fix
Browse files Browse the repository at this point in the history
Additional caching fixes
  • Loading branch information
orklah authored Oct 17, 2023
2 parents 1cdef40 + 18c037e commit 5a86278
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Diff/FileStatementsDiffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static function (
if ($diff_elem->old->getDocComment() === $diff_elem->new->getDocComment()) {
$keep = [...$keep, ...$class_keep[0]];
} else {
$keep_signature = [...$keep_signature, ...$class_keep[0]];
$add_or_delete = [...$add_or_delete, ...$class_keep[0]];
}
$keep_signature = [...$keep_signature, ...$class_keep[1]];
$add_or_delete = [...$add_or_delete, ...$class_keep[2]];
Expand Down
13 changes: 13 additions & 0 deletions tests/Cache/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ public function foo($baz): void
}
}
PHP,
'/src/B.php' => <<<'PHP'
<?php
class B {
public function foo(): void
{
(new A)->foo(1);
}
}
PHP,
],
'issues' => [],
],
Expand All @@ -244,6 +254,9 @@ public function foo($baz): void
'/src/A.php' => [
"UndefinedDocblockClass: Docblock-defined class, interface or enum named T does not exist",
],
'/src/B.php' => [
"InvalidArgument: Argument 1 of A::foo expects T, but 1 provided",
],
],
],
],
Expand Down

0 comments on commit 5a86278

Please sign in to comment.