diff --git a/src/Symfony/Bundle/DependencyInjection/Compiler/TestClientPass.php b/src/Symfony/Bundle/DependencyInjection/Compiler/TestClientPass.php index bd0c4bddb65..c00bcdfc7ff 100644 --- a/src/Symfony/Bundle/DependencyInjection/Compiler/TestClientPass.php +++ b/src/Symfony/Bundle/DependencyInjection/Compiler/TestClientPass.php @@ -26,7 +26,8 @@ final class TestClientPass implements CompilerPassInterface public function process(ContainerBuilder $container): void { if ( - !class_exists(AbstractBrowser::class) + !class_exists(Client::class) + || !class_exists(AbstractBrowser::class) || !trait_exists(HttpClientTrait::class) || !$container->hasParameter('test.client.parameters') ) { diff --git a/tests/Symfony/Bundle/DependencyInjection/Compiler/TestClientPassTest.php b/tests/Symfony/Bundle/DependencyInjection/Compiler/TestClientPassTest.php index 3409af97d3a..0f939c43239 100644 --- a/tests/Symfony/Bundle/DependencyInjection/Compiler/TestClientPassTest.php +++ b/tests/Symfony/Bundle/DependencyInjection/Compiler/TestClientPassTest.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace ApiPlatform\Tests\Symfony\Bundle\DependencyInjection\Compiler; +namespace ApiPlatform\Symfony\Bundle\DependencyInjection\Compiler; use ApiPlatform\Symfony\Bundle\DependencyInjection\Compiler\TestClientPass; use ApiPlatform\Test\Client;