Skip to content

Commit 6bf0823

Browse files
committed
[DebugBundle][VarDumper] Fix server dumper placeholder command
1 parent 6752200 commit 6bf0823

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Command/ServerDumpPlaceholderCommand.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\DebugBundle\Command;
1313

14+
use Symfony\Component\Console\Command\Command;
1415
use Symfony\Component\Console\Input\InputInterface;
1516
use Symfony\Component\Console\Output\OutputInterface;
1617
use Symfony\Component\Console\Style\SymfonyStyle;
@@ -24,15 +25,22 @@
2425
*
2526
* @internal
2627
*/
27-
class ServerDumpPlaceholderCommand extends ServerDumpCommand
28+
class ServerDumpPlaceholderCommand extends Command
2829
{
30+
private $replacedCommand;
31+
2932
public function __construct(DumpServer $server = null, array $descriptors = array())
3033
{
31-
parent::__construct(new class() extends DumpServer {
32-
public function __construct()
33-
{
34-
}
35-
}, $descriptors);
34+
$this->replacedCommand = new ServerDumpCommand((new \ReflectionClass(DumpServer::class))->newInstanceWithoutConstructor(), $descriptors);
35+
36+
parent::__construct();
37+
}
38+
39+
protected function configure()
40+
{
41+
$this->setDefinition($this->replacedCommand->getDefinition());
42+
$this->setHelp($this->replacedCommand->getHelp());
43+
$this->setDescription($this->replacedCommand->getDescription());
3644
}
3745

3846
protected function execute(InputInterface $input, OutputInterface $output)

0 commit comments

Comments
 (0)