Skip to content

[Console] Fix missing command not matching namespace error message #48580

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

Conversation

tgalopin
Copy link
Contributor

@tgalopin tgalopin commented Dec 9, 2022

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix for #47750
License MIT
Doc PR -

Following #47750, running a command with an exception not related to the console (for instance fatal error) could end up in a situation where the error handling code doesn't stop the execution flow and result in:

In Application.php line 307:

  [ErrorException]
  Warning: Undefined variable $command

This fixes this behavior by throwing the original exception when no other error handling cases could handle the problem.

@tgalopin tgalopin requested a review from chalasr as a code owner December 9, 2022 16:08
@carsonbot carsonbot added this to the 6.3 milestone Dec 9, 2022
@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "6.3" but it seems your PR description refers to branch "6.2".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@tgalopin tgalopin changed the base branch from 6.3 to 6.2 December 9, 2022 16:08
@tgalopin tgalopin force-pushed the fix/missing-command-not-matching-namespace branch from 760a1ad to 780aa93 Compare December 9, 2022 16:10
@chalasr
Copy link
Member

chalasr commented Dec 9, 2022

Could you please add a test case?

@tgalopin tgalopin force-pushed the fix/missing-command-not-matching-namespace branch from 780aa93 to e775d0d Compare December 11, 2022 17:43
@chalasr chalasr modified the milestones: 6.3, 6.2 Dec 11, 2022
@tgalopin tgalopin force-pushed the fix/missing-command-not-matching-namespace branch from e775d0d to 1e7202d Compare December 11, 2022 17:45
@tgalopin
Copy link
Contributor Author

Fabbpot isn't happy either but I guess we can safely ignore it :)

@carsonbot carsonbot changed the title Fix missing command not matching namespace error message [Console] Fix missing command not matching namespace error message Dec 13, 2022
@nicolas-grekas
Copy link
Member

Thank you @tgalopin.

@nicolas-grekas nicolas-grekas merged commit 4e8c602 into symfony:6.2 Dec 13, 2022
@fabpot fabpot mentioned this pull request Dec 16, 2022
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.

4 participants