Skip to content

Commit 9e36c97

Browse files
[DI] disable preload.php on the CLI
1 parent 8dbea1d commit 9e36c97

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Dumper/PhpDumper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ public function dump(array $options = [])
319319
320320
use Symfony\Component\DependencyInjection\Dumper\Preloader;
321321
322+
if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
323+
return;
324+
}
325+
322326
require $autoloadFile;
323327
require __DIR__.'/Container{$hash}/{$options['class']}.php';
324328

0 commit comments

Comments
 (0)