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

[FrameworkBundle] Fail properly on unregistrable command#48547

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
simPod wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromsimPod:fail

Conversation

simPod
Copy link
Contributor

@simPodsimPod commentedDec 8, 2022
edited
Loading

QA
Branch?6.3
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT
Doc PRsymfony/symfony-docs#...

When commands are not possible to be registered, the console should return non-zero status code and not fail silently

Real-case scenario: SncRedisBundle v4.4 broke the rest of my commands because its commands could not be registeredsnc/SncRedisBundle#683.
I runbin/console in CI to see if something is broken.
But even though in CI there were tonz of warnings, it returned Success at the end and the broken application slipped into the production and broke it.

 [WARNING] Some commands could not be registered:In ReplicationOption.php line 52:  Values evaluating to FALSE are not accepted for `replication`In ReplicationOption.php line 52:  Values evaluating to FALSE are not accepted for `replication`In ReplicationOption.php line 52:  Values evaluating to FALSE are not accepted for `replication`

ro0NL reacted with thumbs up emoji
@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@simPodsimPod marked this pull request as ready for reviewDecember 8, 2022 13:45
@carsonbotcarsonbot added this to the6.3 milestoneDec 8, 2022
@carsonbotcarsonbot changed the title[FrameworkBundle]: Fail properly on unregistrable command[FrameworkBundle] : Fail properly on unregistrable commandDec 8, 2022
@OskarStarkOskarStark changed the title[FrameworkBundle] : Fail properly on unregistrable command[FrameworkBundle] Fail properly on unregistrable commandDec 8, 2022
$this->renderRegistrationErrors($input, $output);
}

$this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher'));

return parent::doRun($input, $output);
returnmax($statusCode,parent::doRun($input, $output));

Choose a reason for hiding this comment

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

I think we should not change the status code of all existing commands.
Instead, I propose that we change the status code of the "list" command only.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Hm, but why? Is there any reason any command should succeed when there are registration errors?

Copy link
Member

Choose a reason for hiding this comment

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

Same question the other way around, I'm against breaking the whole console when only one command is down.

@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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@chalasrchalasrchalasr left review comments

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

6 participants
@simPod@carsonbot@nicolas-grekas@chalasr@fabpot@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp