Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6f99da

Browse files
bug#26955 [DebugBundle][VarDumper] Fix server dumper placeholder command (ogizanagi)
This PR was merged into the 4.1-dev branch.Discussion----------[DebugBundle][VarDumper] Fix server dumper placeholder command| Q | A| ------------- | ---| Branch? | master <!-- see below -->| Bug fix? | no, fixes a deprecation warning| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no, fixes ones <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets |#26944 <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | N/AThis placeholder command was addressed in quite an unorthodox fashion and the following fix isn't really better, but I guess that's fine for an internal class._As a reminder: this command aims to favor discoverability of the `ServerDumpCommand` when listing available commands and by exposing its definition so you can read about it by using `--help`. Execution hints about the `debug.dump_destination` config option required to wire the actual command._That's the only command for which we're doing this, though. So better keep this placeholder or drop it?Commits-------60af39b [DebugBundle][VarDumper] Fix server dumper placeholder command
2 parents7183c59 +60af39b commite6f99da

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎src/Symfony/Bundle/DebugBundle/Command/ServerDumpPlaceholderCommand.php‎

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

1212
namespaceSymfony\Bundle\DebugBundle\Command;
1313

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

3846
protectedfunctionexecute(InputInterface$input,OutputInterface$output)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp