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] Show Application-level console options when showing synopsis or when error occurred#47436

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
jlslew wants to merge11 commits intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromjlslew:feature/42765

Conversation

jlslew
Copy link

@jlslewjlslew commentedAug 30, 2022
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#42765
LicenseMIT
Doc PRsymfony/symfony-docs#...
BC BreakI think yes

Create a file in the root directory of a Symfony project with the following code, then runphp FILENAME echo --help --format FORMAT

#!/usr/bin/env php<?phprequire__DIR__ .'/vendor/autoload.php';useSymfony\Component\Console\Application;useSymfony\Component\Console\Command\Command;useSymfony\Component\Console\Input\InputArgument;useSymfony\Component\Console\Input\InputInterface;useSymfony\Component\Console\Input\InputOption;useSymfony\Component\Console\Output\OutputInterface;$application =newApplication('jlslew','1.0.0');$application->add(newclassextends Command {protectedfunctionconfigure():void    {$this->setName('echo')            ->setDescription('The description of the command')            ->addArgument('argument', InputArgument::REQUIRED,'The argument to execute')            ->addOption('option', mode: InputOption::VALUE_REQUIRED, description:'The option to execute');    }protectedfunctionexecute(InputInterface$input,OutputInterface$output):int    {$output->writeln('Hello World!');return0;    }});$application->run();

EDIT: It might break BC because methods' signature has been changed (Added an argument with a default value)

@carsonbot
Copy link

Hey!

I think@mdeboer has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@OskarStarkOskarStark changed the title[Console] Feature/42765 Show Application-level console options when showing synopsis or when error occured[Console] Show Application-level console options when showing synopsis or when error occurredSep 8, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.4,7.1Nov 15, 2023
@xabbuhxabbuh modified the milestones:7.1,7.2May 15, 2024
@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@fabpotfabpot removed this from the7.3 milestoneMay 26, 2025
@fabpotfabpot added this to the7.4 milestoneMay 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

Show Application-level console options when showing synopsis or when error occured
5 participants
@jlslew@carsonbot@fabpot@nicolas-grekas@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp