From e5338731843fc1c20e48155d742ef7b57f00db35 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 11 Jan 2024 09:51:06 +0100 Subject: [PATCH] support lazy evaluated exception messages with Xdebug 3 --- .../Exception/AutowiringFailedException.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php b/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php index 6887701950aca..f9c4ffa345a44 100644 --- a/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php +++ b/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php @@ -23,9 +23,7 @@ public function __construct(string $serviceId, $message = '', int $code = 0, ?\T { $this->serviceId = $serviceId; - if ($message instanceof \Closure - && (\function_exists('xdebug_is_enabled') ? xdebug_is_enabled() : \function_exists('xdebug_info')) - ) { + if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) { $message = $message(); }