Skip to content

Commit e60d2b7

Browse files
authored
Catch even Throwable when trying to create class
If class require connection to database for creation for example getting state from there and saving to property. This break psalm anaylis currently. This case happen when CI environment does not have connection to database.
1 parent 7524304 commit e60d2b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/ContainerResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static function resolveFromApplicationContainer(string $abstract): ?stri
4242
// dynamic analysis to resolve the actual type from the container
4343
try {
4444
$concrete = ApplicationProvider::getApp()->make($abstract);
45-
} catch (BindingResolutionException | ReflectionException $e) {
45+
} catch (\Throwable $e) {
4646
return null;
4747
}
4848

0 commit comments

Comments
 (0)