Merge pull request #228 from Legion112/patch-1

Catch even Throwable when trying to create class
This commit is contained in:
feek 2022-06-09 11:41:17 -04:00 committed by GitHub
commit c82b7c7cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,14 +4,12 @@ declare(strict_types=1);
namespace Psalm\LaravelPlugin\Util;
use Illuminate\Contracts\Container\BindingResolutionException;
use PhpParser\Node\Arg;
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
use Psalm\NodeTypeProvider;
use Psalm\Type\Atomic\TLiteralString;
use Psalm\Type\Atomic\TNamedObject;
use Psalm\Type\Union;
use ReflectionException;
use function array_key_exists;
use function class_exists;
@ -42,7 +40,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;
}