diff --git a/src/Concerns/ConcreteMagic.php b/src/Concerns/ConcreteMagic.php index 666a07c..f7f7d09 100644 --- a/src/Concerns/ConcreteMagic.php +++ b/src/Concerns/ConcreteMagic.php @@ -13,6 +13,7 @@ namespace Guanguans\SoarPHP\Concerns; use Guanguans\SoarPHP\Exceptions\InvalidOptionException; +use Symfony\Component\VarDumper\VarDumper; /** * @mixin \Guanguans\SoarPHP\Soar @@ -51,7 +52,9 @@ public function __wakeup(): void public function __debugInfo(): array { - return get_object_vars($this) + ['commandLine' => (string) $this]; + $debugInfo = ['commandLine' => (string) $this]; + + return class_exists(VarDumper::class) ? $debugInfo : get_object_vars($this) + $debugInfo; } /**