diff --git a/Command/DumpCommand.php b/Command/DumpCommand.php index 862fd7796..b2521d8a0 100644 --- a/Command/DumpCommand.php +++ b/Command/DumpCommand.php @@ -61,7 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $formatter->setEnableSandbox(false); } - if ('html' === $format) { + if ('html' === $format && method_exists($this->getContainer(), 'enterScope')) { $this->getContainer()->enterScope('request'); $this->getContainer()->set('request', new Request(), 'request'); }