Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Document invokable command#20932

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.3fromyceruto:invokable_command
Jul 1, 2025

Conversation

yceruto
Copy link
Member

@ycerutoyceruto commentedMay 1, 2025
edited by javiereguiluz
Loading

Closes#20553

Pending docs to be updated:

chalasr reacted with rocket emoji
Copy link
Contributor

@alamiraultalamirault left a comment
edited
Loading

Choose a reason for hiding this comment

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

I like the harmonization of some command names 👍

#[AsCommand(name: 'app:create-user')]
class CreateUserCommand
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should make all these changes with the #AsCommand attribute in a separate PR to avoid growing this PR?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I’d actually prefer to keep all these related changes in a single PR, since they’re closely tied together. It helps keep the context in one place and makes it easier to review everything as a whole.

In any case, we can go ahead and merge this one, then open a new PR for the remaining updates.

OskarStark reacted with thumbs up emoji
@yceruto
Copy link
MemberAuthor

Thanks@alamirault and@OskarStark for your review 🙏

I’m actively looking for someone to help me refactorconsole.rst, as I’m running out of free-time before the final release.

@94noni
Copy link
Contributor

94noni commentedMay 5, 2025
edited
Loading

Pending docs to be updated:

I would also addhttps://symfony.com/doc/current/console/input.html, wdyt@yceruto ?
I can help on this in a separate unitary PR if its ok

yceruto reacted with heart emoji

@yceruto
Copy link
MemberAuthor

Thanks, Antoine! Sure, go for it.

Here we're discussing input related topicssymfony/symfony#59602

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

Yonel, thanks a lot for this massive contribution 🙇

I agree with what you said here:

we can go ahead and merge this one, then open a new PR for the remaining updates

I'll wait a bit to read more opinions, but that's the plan I'd like to follow. Thanks!

yceruto reacted with thumbs up emoji
Copy link
Member

@wouterjwouterj left a comment
edited
Loading

Choose a reason for hiding this comment

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

I agree with doing the work in steps, but I think the order should be swapped around.

We can't update all examples across the documentation to use features that we didn't document properly in my opinion. This applies in particular toconsole/input.rst, which has to be updated before we can start using#[Option]/#[Argument] in the documentation.
But it would be perfectly fine if all articles in the docs still have outdated (too complex) examples, but the main guides are updated to document both the simple + advanced way.

We must also be careful about updating an example without updating the context it is placed in (I tried to comment on those cases whenever I saw this).

@yceruto
Copy link
MemberAuthor

yceruto commentedMay 13, 2025
edited
Loading

Thanks@wouterj,@94noni, and@javiereguiluz for your feedback! I will try to address it ASAP

@ycerutoycerutoforce-pushed theinvokable_command branch 8 times, most recently fromfd23b35 to585684eCompareMay 28, 2025 22:07
@yceruto
Copy link
MemberAuthor

FYI,console.rst file is ready for review.

Working onconsole/input.rst...

@@ -472,7 +412,7 @@ command:
Note that it will not be called when the command is run without interaction
(e.g. when passing the ``--no-interaction`` global option flag).

:method:`Symfony\\Component\\Console\\Command\\Command::execute` *(required)*
``__invoke()`` *(required)*
Copy link
Contributor

Choose a reason for hiding this comment

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

execute is still in Lifecycle I think

Suggested change
``__invoke()`` *(required)*
``__invoke()``and:method:`Symfony\\Component\\Console\\Command\\Command::execute`*(required)*

What do you think ?

yceruto and javiereguiluz reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

maybe withor instead ofand

yceruto, alamirault, and javiereguiluz reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Done while merging. Thanks!

@OskarStark
Copy link
Contributor

open to finish this PR@yceruto ? 🙏

@yceruto
Copy link
MemberAuthor

No time to finish this soon :( sorry, looking for help to finish the remaining docs 🙏

OskarStark reacted with thumbs up emoji

@javiereguiluzjaviereguiluz merged commit8e0f3f5 intosymfony:7.3Jul 1, 2025
3 checks passed
@javiereguiluz
Copy link
Member

Yonel, thanks a lot for this immense and great contribution 🙇

I merged this because:

  • It's already colossal
  • Not merging this is blocking many other PRs related to console
  • I'm going to open new issues for the pending things

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@stofstofstof left review comments

@OskarStarkOskarStarkOskarStark left review comments

@94noni94noni94noni left review comments

@alamiraultalamiraultalamirault left review comments

@wouterjwouterjwouterj requested changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

[Console] Add support for invokable commands and input attributes
8 participants
@yceruto@94noni@OskarStark@javiereguiluz@stof@wouterj@alamirault@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp