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
[DX] Improve the output of all Symfony commands #11784
Comments
the styleguide should also include how one should name commands. Also, in some places we have something:debug and others debug:something |
@jrobeson we are using |
I am a heavy user of commands and I noticed this a few times. Love the idea of the styleguide. I would like to help with this topic. |
I like this idea. I propose to take the
This means we have to add a |
@wouterj thanks for your proposal! Unfortunately, for now this PR is just an idea. It hasn't been approved by the Symfony Core, so we must wait for their response before starting to work on it. |
@javiereguiluz yes, I know. But I wanted to give an example of such a styleguide and I wanted to share what I think is best :) |
Big 👍 for the style guide. I have some very opinionated ideas about how things should look like, so whenever we have a draft, I would be more than happy to have a look at it. |
I am not sure if the following idea applies for this issue, but I think it is related, although it could certainly be a new one. The help command offers the ability to output xml. This is very useful for consuming the output with other scripts. What about having some kind of native support for xml output for all commands? This could be very useful for catching errors, consuming data printed on tables or lists, etc, when calling commands from other scripts |
i'd like a more directly scriptable/machine readable output like git has vs xml. the most used commands themselves (push,pull, clone, fetch) are just porcelains (git nomenclature) around the internal commands |
👍 too! Making more standard and unified commands would be better. |
👍 for this, i love the unity and the new security:check looks refreshing. I think we could take some parts of it as guide. :) Nice one @javiereguiluz ! |
Besides the guide, we should also make sure that the helpers follow our recommendations. The |
I'm preparing a first draft of this style guide to bootstrap discussions with the people that showed interest in this issue. |
👍 Really nice idea ! Would be happy to help you on that work. |
Great proposal 👍 |
We've prepared a preview of the new Symfony Console Style Guide. Some things are missing, but please download it, review it and provide some feedback: Download Symfony Console Style Guide (PDF, 107 KB) UPDATE: the original PDF is no longer available, as we've separated it into two different documents (the style guide and the implementation guide). |
That's nice ! I really like this. The only thing that I find not really relevant is the red warning which I do not find enough explicit on the danger of the command from the "php app/console doctrine:database:drop" I find the old way more explicit. |
nice docu @javiereguiluz maybe to be more concrete we can have the styleguide put into some Factories::getStyles or a class with names on it something that can provide concrete names from the Guideline, that will make the guideline even more easy to implement and follow? or i am missing the point here.. great work JJ |
@cordoval you have exactly described the next step! I'm doing it right now :) |
you rockn', I am looking forward to experiment this new guide with Gush because all are symfony commands 👍 so i will be rather active if it involves command output beautification. Gush and Bldr I believe can greatly benefit from this cc @aequasi |
I see an issue with this proposal: the fact that it relies on table output makes it hard to stream the output. The style guide should avoid enforcing interfaces which cannot be streamed, as streming is a common need in CLI. |
@stof good catch! One of the problems of the style guide is that I mixed design and implementation. It should have been an agnostic style guide, but I wanted to show real examples based on the current commands. In any case, the solution to this problem is very easy: drop the table output because it's inappropriate for this command and output the info with simple debug messages. |
@javiereguiluz IMO, you should split your work in 2:
The first document would then become part of the Symfony documentation, while the second one would become obsolete as soon as the migration is completed (we should keep it around for a while to help bundle to migrate as well) |
@stof good idea! I'll do that once we receive more community feedback and we consider the style guide as finished. |
I like it. |
Really nice!
Anyway, I look forward to see it applied to all commands! |
If you put the guide part in the docs now, it would be easier to comment on it |
hey @javiereguiluz good doc so far! and good idea for this thread. A few ideas:
|
Did you mean "pronunciation"? Sorry!!!! The styleguide looks very promising! Keep the awesome work ❤️ Also at page 20 of the document, the subtitle should be "PROPOSAL" instead of "CURRENT". Did I miss the repo of the document to send minor typos? |
The style guide has been updated. All the discussion has been moved to symfony/symfony-docs#4265 as requested by @wouterj. Please provide as much feedback as you can. Thanks! |
@javiereguiluz I meant as an rst file instead of an PDF, sorry for being unclear |
@wouterj I'm afraid that right now we can't transform the guide to RST because it would take a lot of time. I propose you instead to discuss the PDF contents and once it's finished, let's transform it. |
Don't worry, I'm already doing that
|
(Note: I know that this is issue is mostly related to Symfony bundles and not Symfony code itself, but I think that opening the issue in this repo is the best thing to promote a discussion)
The problem
The output of the Symfony commands is completely different from one command to another. This makes more difficult to use them and shows a lack of attention to details:
Moreover, error messages are not designed for humans:
The solution
If this DX issue is approved by @symfony/mergers and @symfony/deciders I propose the following:
The text was updated successfully, but these errors were encountered: