1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Merge pull request #6068 from caugner/make-ClassLikeNodeScanner-resilient-against-missing-class-storage

Make ClassLikeNodeScanner resilient against missing class storage
This commit is contained in:
Bruce Weirdan 2021-07-11 03:18:31 +03:00 committed by GitHub
commit d1f894a5a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,11 @@ class ClassLikeNodeScanner
$storage->aliases = $this->aliases;
foreach ($storage->dependent_classlikes as $dependent_name_lc => $_) {
$dependent_storage = $this->codebase->classlike_storage_provider->get($dependent_name_lc);
try {
$dependent_storage = $this->codebase->classlike_storage_provider->get($dependent_name_lc);
} catch (\InvalidArgumentException $exception) {
continue;
}
$dependent_storage->populated = false;
$this->codebase->classlike_storage_provider->makeNew($dependent_name_lc);
}