From b61e809aef99f95c8a93eb7efbbcb794cfccefca Mon Sep 17 00:00:00 2001 From: siganushka Date: Thu, 21 Nov 2024 12:43:31 +0800 Subject: [PATCH] refactor: Using is_subclass_of replace is_a --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 77c84f9..8d75689 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -32,7 +32,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->cannotBeEmpty() ->defaultValue(UniqidTokenGenerator::class) ->validate() - ->ifTrue(static fn (mixed $v): bool => \is_string($v) && !is_a($v, RequestTokenGeneratorInterface::class, true)) + ->ifTrue(static fn (mixed $v): bool => \is_string($v) && !is_subclass_of($v, RequestTokenGeneratorInterface::class, true)) ->thenInvalid('The value must be instanceof '.RequestTokenGeneratorInterface::class.', %s given.') ->end() ->end()