[DebugBundle][VarDumper] Fix server dumper placeholder command
This commit is contained in:
parent
ccb0e84799
commit
60af39b161
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\DebugBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
@ -24,15 +25,22 @@ use Symfony\Component\VarDumper\Server\DumpServer;
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class ServerDumpPlaceholderCommand extends ServerDumpCommand
|
||||
class ServerDumpPlaceholderCommand extends Command
|
||||
{
|
||||
private $replacedCommand;
|
||||
|
||||
public function __construct(DumpServer $server = null, array $descriptors = array())
|
||||
{
|
||||
parent::__construct(new class() extends DumpServer {
|
||||
public function __construct()
|
||||
{
|
||||
$this->replacedCommand = new ServerDumpCommand((new \ReflectionClass(DumpServer::class))->newInstanceWithoutConstructor(), $descriptors);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
}, $descriptors);
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setDefinition($this->replacedCommand->getDefinition());
|
||||
$this->setHelp($this->replacedCommand->getHelp());
|
||||
$this->setDescription($this->replacedCommand->getDescription());
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
|
Reference in New Issue
Block a user