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] Fine-tuning the interactive#[Ask] attribute#61978

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

Open
yceruto wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromyceruto:console_interact

Conversation

yceruto
Copy link
Member

@ycerutoyceruto commentedOct 6, 2025
edited
Loading

QA
Branch?7.4
Bug fix?no
New feature?no
Deprecations?no
Issues-
LicenseMIT

Complements#61748, concerning interactive array and boolean arguments.

Definition:

publicfunction __invoke(    #[Argument, Ask('Must be unique?')]bool$unique,    #[Argument, Ask('Enter the tag (leave blank to finish)')]array$tags,):int

Input:

$ bin/console app:add-tagsMust be unique? (yes/no) [no]:> yesEnter the tag (leave blank to finish):> tag1Enter the tag (leave blank to finish):> tag2Enter the tag (leave blank to finish):>

As expected, you'll get atrue value in$unique, and["tag1", "tag2"] in$tags.

@ycerutoyceruto changed the title[Console] Fixed array arguments support for interactive questions[Console] Fine-tuning the interactive#[Ask] attributeOct 7, 2025
@yceruto
Copy link
MemberAuthor

Update: I also added better support for bool arguments: usingConfirmationQuestion instead.

chalasr reacted with thumbs up emoji

@yceruto
Copy link
MemberAuthor

Other tests skip hidden questions on Windows, so I did the same to make these pass.

Failure:https://github.com/symfony/symfony/actions/runs/18308113247/job/52130086124?pr=61978#step:7:1384

@yceruto
Copy link
MemberAuthor

rebased after#62004

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

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

+1 more reviewer

@mttschmttschmttsch left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

5 participants
@yceruto@nicolas-grekas@chalasr@mttsch@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp