Skip to content
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

[Console] Document the TreeHelper #20786

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

smnandre
Copy link
Member

@smnandre smnandre commented Mar 21, 2025

Q A
Feature PR symfony/symfony#59588
PR author(s) @smnandre
Merged in 7.3
Doc Issue Fix #20692

fix #20692


.. code-block:: text

🔵 🟣 🟡 src
Copy link
Contributor

Choose a reason for hiding this comment

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

I love this example ❤️

🔵 🟢 🟢 🟠 🟡 DefaultController.php
🔵 🟢 🟠 🟡 Kernel.php
🔵 🟠 🟡 templates
🔵 🔴 🟠 🟡 base.html.twig
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a versionadded directive below, like for other new features, thanks

Copy link
Member Author

Choose a reason for hiding this comment

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

The whole page is about the new tree helper, should i put the versionadded at the very start of the page ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think yes, and add it also in console/style.rst after the new methods

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please, so that a reader knows, since when this can be used

Copy link
Member Author

Choose a reason for hiding this comment

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

Would this work ? (last changes)

@smnandre smnandre requested a review from OskarStark March 22, 2025 02:35
@OskarStark
Copy link
Contributor

Link to the code PR is not working in the PR header

@OskarStark OskarStark changed the title [Console] Document the TreeHelper [Console] Document the TreeHelper Mar 22, 2025
@smnandre
Copy link
Member Author

Link to the code PR is not working in the PR header

Fixed sorry

@javiereguiluz javiereguiluz merged commit b39f1c1 into symfony:7.3 Mar 24, 2025
2 of 3 checks passed
@javiereguiluz
Copy link
Member

Thanks Simon for contributing this nice feature and for providing such detailed docs for it.

While merging I did some tweaks (see a0758ac):

  • Updated the intro to add some examples of when using this
  • Added a full code example of using this inside a console command. This is important because if you copy+paste the examples, it won't work (e.g. the $io variable is not defined). I only added this in the first example to avoid boring repetition
  • Changed text by terminal in the code examples to display the rendered output in a terminal-like window.

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.

[Console] Add a Tree Helper + multiple Styles
5 participants