Skip to content

[Console] Add --markdown export to HelpCommand#6339

Closed
zczapran wants to merge 1 commit intosymfony:masterfrom
zczapran:issue/6327
Closed

[Console] Add --markdown export to HelpCommand#6339
zczapran wants to merge 1 commit intosymfony:masterfrom
zczapran:issue/6327

Conversation

@zczapran
Copy link
Copy Markdown

Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #6327
Todo: none
License of the code: MIT

@igorw
Copy link
Copy Markdown
Contributor

igorw commented Dec 13, 2012

At this point we should consider separating formatting from the command class itself, and perhaps having a --format=xml flag instead of --xml.

@zczapran
Copy link
Copy Markdown
Author

Yep, but that would involve some bigger refactoring.

@Seldaek
Copy link
Copy Markdown
Member

Seldaek commented Dec 14, 2012

Thanks, it's a good start. It doesn't respect the docopt spec fully but that can always be improved with time, at least it seems to render something usable.

@zczapran
Copy link
Copy Markdown
Author

Build is failing because of a failing test in master.

@stloyd
Copy link
Copy Markdown
Contributor

stloyd commented Jan 2, 2013

@fabpot Could you review this ?

@fabpot
Copy link
Copy Markdown
Member

fabpot commented Apr 20, 2013

Closing in favor of #7454

@fabpot fabpot closed this Apr 20, 2013
fabpot added a commit that referenced this pull request Apr 23, 2013
This PR was squashed before being merged into the master branch (closes #7454).

Discussion
----------

[Console] application/command as text/xml/whatever decoupling

This PR removes description generation from `Command`, `Application` and `InputDefinition` classes and delegate it to specialized descriptor classes, making it dead simple to add new output formats.

**Maybe this could include other commands, like `router:debug` or `container:debug` (see #5740)?**

- [x] Add a `DescriptorProvider` which uses `DescriptorInterface` objects to describe things.
- [x] Add `txt` descriptors.
- [x] Add `xml` descriptors.
- [x] Add `json` descriptors.
- [x] Add `md` descriptors.
- [x] Remove obsolete methods.
- [x] Repair tests.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6339

Commits
-------

51512e6 [Console] application/command as text/xml/whatever decoupling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants