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.
This commit is contained in:
Max Ageev 2022-06-09 17:21:57 +03:00 committed by GitHub
parent 7524304c07
commit e60d2b7752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ final class ContainerResolver
// dynamic analysis to resolve the actual type from the container // dynamic analysis to resolve the actual type from the container
try { try {
$concrete = ApplicationProvider::getApp()->make($abstract); $concrete = ApplicationProvider::getApp()->make($abstract);
} catch (BindingResolutionException | ReflectionException $e) { } catch (\Throwable $e) {
return null; return null;
} }