Skip to content

Commit ceb9cce

Browse files
vertexvaarnicolas-grekas
authored andcommitted
[DI] Fix Xdebug 3.0 detection
1 parent f2edc17 commit ceb9cce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Exception/AutowiringFailedException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public function __construct(string $serviceId, $message = '', int $code = 0, \Th
2323
{
2424
$this->serviceId = $serviceId;
2525

26-
if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) {
26+
if (
27+
$message instanceof \Closure
28+
&& (\function_exists('xdebug_is_enabled') ? xdebug_is_enabled() : \function_exists('xdebug_info'))
29+
) {
2730
$message = $message();
2831
}
2932

0 commit comments

Comments
 (0)