Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Add ReStructuredText descriptor #48981

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

Closed
wants to merge 0 commits into from

Conversation

danepowell
Copy link
Contributor

Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #45717
License MIT
Doc PR n/a, descriptors are internal and not documented.

Description

The console component currently has descriptors for Markdown, Json, etc. This feature would add Restructured Text descriptor (rst) as an option.

This replaces and addresses all feedback from #45718

Example

$helper = new DescriptorHelper();
$helper->describe($output, $this->getApplication(), [
  'format' => 'rst',
]);

@danepowell
Copy link
Contributor Author

danepowell commented Jan 14, 2023

I don't understand the Psalm failure. The error is Uncaught Exception: InvalidArgumentException Could not get class storage for sessionhandlerinterface which according to --debug-by-line comes from /Users/dane.powell/src/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MigratingSessionHandler.php. I don't see how it could be related to this PR.

@danepowell danepowell changed the title Add ReStructuredText descriptor for console component [Console] Add ReStructuredText descriptor for console component Jan 15, 2023
@danepowell danepowell mentioned this pull request Jan 16, 2023
@danepowell
Copy link
Contributor Author

@fabpot mind reviewing this since you approved the last one?

@carsonbot carsonbot changed the title [Console] Add ReStructuredText descriptor for console component Add ReStructuredText descriptor for console component Jan 21, 2023
fabpot added a commit that referenced this pull request Jan 23, 2023
This PR was squashed before being merged into the 6.3 branch.

Discussion
----------

Fix Psalm errors

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | Not sure what you call a CI fix 🤷
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the latest branch.
 - For new features, provide some code snippets to help understand usage.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Psalm runs frequently fail, such as #48981

Commits
-------

62dcacd Fix Psalm errors
@danepowell
Copy link
Contributor Author

Thanks for the review, all feedback addressed, this is good to go.

Tests are failing in HEAD, so probably not related to this PR. I think every PR I've opened has had failures of this nature.

Have you thought about using branch protections to prevent PRs / commits with failing tests from being merged?

@danepowell danepowell requested review from fabpot and removed request for chalasr January 23, 2023 17:38
@carsonbot carsonbot changed the title Add ReStructuredText descriptor for console component [Console] Add ReStructuredText descriptor for console component Jan 26, 2023
@nicolas-grekas nicolas-grekas changed the title [Console] Add ReStructuredText descriptor for console component [Console] Add ReStructuredText descriptor Jan 26, 2023
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have CS fixes to suggest :)

@danepowell
Copy link
Contributor Author

Thanks for the feedback, all comments addressed.

@danepowell danepowell requested review from nicolas-grekas and removed request for fabpot January 31, 2023 17:33
@anavarre
Copy link

anavarre commented Feb 1, 2023

Is there anything else missing here?

@fabpot
Copy link
Member

fabpot commented Feb 2, 2023

Thank you @danepowell.

fabpot added a commit that referenced this pull request Feb 2, 2023
This PR was squashed before being merged into the 6.3 branch.

Discussion
----------

[Console] Add ReStructuredText descriptor

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #45717
| License       | MIT
| Doc PR        | n/a, descriptors are internal and not documented.

### Description

The console component currently has descriptors for Markdown, Json, etc. This feature would add Restructured Text descriptor (rst) as an option.

This replaces and addresses all feedback from #45718

### Example

```
$helper = new DescriptorHelper();
$helper->describe($output, $this->getApplication(), [
  'format' => 'rst',
]);
```

Commits
-------

f3ab66e [Console] Add ReStructuredText descriptor
@fabpot fabpot closed this Feb 2, 2023
@fabpot
Copy link
Member

fabpot commented Feb 10, 2023

@danepowell Would you be interested in supporting restructuredtext in src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/ as well?

@danepowell
Copy link
Contributor Author

I only build console apps and actively avoid the Framework bundle because of all the web-specific bulk. So I don't have an interest in adding to it.

@fabpot fabpot mentioned this pull request May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RST descriptor for console component.
5 participants