From e60d2b77522efb04f96a282404ca46039713131a Mon Sep 17 00:00:00 2001 From: Max Ageev Date: Thu, 9 Jun 2022 17:21:57 +0300 Subject: [PATCH] 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. --- src/Util/ContainerResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/ContainerResolver.php b/src/Util/ContainerResolver.php index 16c8577..299b20a 100644 --- a/src/Util/ContainerResolver.php +++ b/src/Util/ContainerResolver.php @@ -42,7 +42,7 @@ final class ContainerResolver // dynamic analysis to resolve the actual type from the container try { $concrete = ApplicationProvider::getApp()->make($abstract); - } catch (BindingResolutionException | ReflectionException $e) { + } catch (\Throwable $e) { return null; }