Skip to content

Commit f53e4ae

Browse files
bug symfony#53501 [DependencyInjection] support lazy evaluated exception messages with Xdebug 3 (xabbuh)
This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead. Discussion ---------- [DependencyInjection] support lazy evaluated exception messages with Xdebug 3 | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT The `AutowiringFailedExceptionTest::testLazyness()` passes with Xdebug 3 enabled on my machine. But I would like to get some additional feedback from other Xdebug users. Commits ------- e533873 support lazy evaluated exception messages with Xdebug 3
2 parents 25097df + e533873 commit f53e4ae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ public function __construct(string $serviceId, $message = '', int $code = 0, ?\T
2323
{
2424
$this->serviceId = $serviceId;
2525

26-
if ($message instanceof \Closure
27-
&& (\function_exists('xdebug_is_enabled') ? xdebug_is_enabled() : \function_exists('xdebug_info'))
28-
) {
26+
if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) {
2927
$message = $message();
3028
}
3129

0 commit comments

Comments
 (0)