mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-26 20:34:48 +01:00
Merge pull request #228 from Legion112/patch-1
Catch even Throwable when trying to create class
This commit is contained in:
commit
c82b7c7cdb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user