-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DebugBundle][VarDumper] Fix server dumper placeholder command #26955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DebugBundle][VarDumper] Fix server dumper placeholder command #26955
Conversation
To answer your question, I would drop it. |
{ | ||
private $replacedCommand; | ||
|
||
public function __construct(DumpServer $server = null, array $descriptors = array()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"server" never used. Here for BC? Maybe add a comment about that fact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's only an internal command, no BC implications here.
No, actually as described in the PR description, this is a placeholder command that matches the replaced command's constructor signature (ServerDumpCommand
) so we can just swap the class when the ServerDumper
service cannot be wired.
I like the intend (could apply to many places in core) but not sure it's worth the hassle. |
@ogizanagi lets drop then :) |
When introducing the server dumper feature, I was pretty much +0 about this due to the uncommon way to achieve it, the first of its kind in the core AFAIK. If the intent is approved and you think it could apply to some other places, I don't see any reason to remove it right now. It's internal anyway and pure DX, no hassle. I'd say let's give it a chance and remove it later if things start being more complicated. We'll see if the approach is worth it or not and if it can be applied to some other places (but right now I can't think about any similar case). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with this. @ogizanagi convinced me (as much as I convinced him before ;) )
Thank you @ogizanagi. |
…mand (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 <!-- see https://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/A This 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
This did not fix it, see #27493 |
This 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 thedebug.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?