Skip to content

Commit c82b7c7

Browse files
authored
Merge pull request #228 from Legion112/patch-1
Catch even Throwable when trying to create class
2 parents 7524304 + c35a229 commit c82b7c7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Util/ContainerResolver.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
namespace Psalm\LaravelPlugin\Util;
66

7-
use Illuminate\Contracts\Container\BindingResolutionException;
87
use PhpParser\Node\Arg;
98
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
109
use Psalm\NodeTypeProvider;
1110
use Psalm\Type\Atomic\TLiteralString;
1211
use Psalm\Type\Atomic\TNamedObject;
1312
use Psalm\Type\Union;
14-
use ReflectionException;
1513

1614
use function array_key_exists;
1715
use function class_exists;
@@ -42,7 +40,7 @@ private static function resolveFromApplicationContainer(string $abstract): ?stri
4240
// dynamic analysis to resolve the actual type from the container
4341
try {
4442
$concrete = ApplicationProvider::getApp()->make($abstract);
45-
} catch (BindingResolutionException | ReflectionException $e) {
43+
} catch (\Throwable $e) {
4644
return null;
4745
}
4846

0 commit comments

Comments
 (0)