-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Add the missing output variable #4812
Conversation
@@ -25,6 +25,9 @@ To display a table, use :class:`Symfony\\Component\\Console\\Helper\\Table`, | |||
set the headers, set the rows and then render the table:: | |||
|
|||
use Symfony\Component\Console\Helper\Table; | |||
use Symfony\Component\Console\Output\ConsoleOutput; |
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.
I would move this before the existing use
statement.
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.
@xabbuh not sure I understood you. What is the benefit ?
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.
sorry for the confusion, it's right the way it is
@harikt Thanks for your pull request. |
I'm -1 for this change honestly. This code demostrates the table helper. That means you'll always use it in one of the What's missing instead imo is a simple |
@wouterj for you as an experienced symfonian it will be easy and may not find value in it. But if you ask from someone you may get some feedback :) . |
@harikt I'm aware that this can be confusing. What about adding the method and class definitions? use Symfony\Component\Console\Helper\Table;
+ // ...
+
+ class BookCommand extends Command
+ {
+ public function execute(InputInterface $input, OutputInterface $output)
+ {
- $table = new Table($output);
+ $table = new Table($output);
// ... the rest of the code
+ }
+ } |
@wouterj when you can run without the command I wonder why you need to show like that. What is the advantage you are seeing ? |
@harikt the complete Symfony Console component is designed the way that you use this logic inside |
Hi @harikt! I actually agree with @wouterj - the "normal" use for this is inside the If it is, it's not the main usage, so if we show the creation of the Thanks! |
I am ok with the comments #4812 (comment) |
@harikt Cool, will you be able to make those changes? I think once that's done, the PR is ready to be merged. |
Hi @harikt! There is a doc sprint day tomorrow. I would like to have this PR finished at the end of tomorrow, can you work on it or should we put it on the list so someone else can finish it? |
Hey @wouterj , You can assign this to someone else. My internet is broken and have very limited access. Else I wished I could. Also got busy with family and things :( . Enjoy the sprint. |
I also noticed one thing . From the https://symfony.com/components there is no link to Validation docs. Why is it not added? Is there any other tickets already ? |
@harikt This sounds good.
They don't exist yet (see #958). |
@xabbuh I forgot to ask a question. To which branch it should go ? |
I send a PR to 2.7 as @xabbuh as already mentioned the time frame
|
Thanksfor your PR, @harikt! I'm going to close this one, as it's replaced by your new one. |
…d, so users … (harikt) This PR was submitted for the 2.7 branch but it was merged into the 2.6 branch instead (closes #5392). Discussion ---------- Wrap the table creation inside the class extending Command, so users … …know where the comes. They can use it as standalone when needed. This PR is with the changes mentioned in #4812 Commits ------- 00e6d3e Wrap the table creation inside the class extending Command, so users know where the comes. They can use it as standalone when needed
For the 2.3 branch there is no
table.rst
file as it is introduced in 2.5 .I have checkout from 2.5 and created the PR .
Let me know if I need to send this to master for 2.5 is not LTS .