[DI] disable preload.php on the CLI

This commit is contained in:
Nicolas Grekas 2020-06-19 15:00:29 +02:00
parent a2c2393574
commit 50ccf2f1b2
1 changed files with 4 additions and 0 deletions

View File

@ -319,6 +319,10 @@ EOF;
use Symfony\Component\DependencyInjection\Dumper\Preloader;
if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
return;
}
require $autoloadFile;
require __DIR__.'/Container{$hash}/{$options['class']}.php';