-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Added resource debug command #5458
Conversation
public function configure() | ||
{ | ||
$this->setName('sylius:debug:resource'); | ||
$this->addArgument('resource', InputArgument::OPTIONAL, 'Resource to debug'); |
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.
Add help, description
Need to add tests. |
Looks awesome! 👍 🎉 |
I would be really useful! Nice. 👍 |
I think it would be enough to just list all resources after |
Primo: Nice feature, happy to see such an idea ;) |
@@ -0,0 +1,91 @@ | |||
<?php | |||
|
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.
Missing license block.
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.
Added
I'm open to that, however, what advatages does that offer over the current approach? With the choice you only have to type a number (max 3 chars) to view the metadata, otherwise you will either need to memorize or copy and paste the name of the service and re-run the command. |
I just matter of the default symfony2 behaviour. If we would go this way, it easier to grep some data or send a proper command to somebody. Also, I think it can be annoying to look for a proper resource between hundreds of them. |
yeah grepping is a good argument, ofc we could act on the default |
00bc1d1
to
56384d5
Compare
Switched to using a standard list (no choice) and added tests. This good for me. |
56384d5
to
e6cc121
Compare
*/ | ||
class DebugResourceCommand extends Command | ||
{ | ||
private $registry; |
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.
There are still plenty of docblocks missing in this file...
e6cc121
to
1bd629d
Compare
1bd629d
to
a7d4fa9
Compare
Added docblocks .. |
Looks almost perfect, thank you very much Dan! Could you just add |
a7d4fa9
to
10ef4bc
Compare
Updated :) On Sun, Jul 10, 2016 at 03:20:40AM -0700, Paweł Jędrzejewski wrote:
|
Awesome, this will be very useful! Cheers! 👍 |
This PR adds a command to debug resources:
The above should dumps all of the information in the
metadata
class. We could go further and show the routes associated with the resource, WDYT?