-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] By default hide the short exception trace line from exception messages in Symfony's commands #27143
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
[Console] By default hide the short exception trace line from exception messages in Symfony's commands #27143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
👍 but does it really qualify as a bugfix? |
@@ -179,7 +181,7 @@ private function createPasswordQuestion() | |||
|
|||
return $passwordQuestion->setValidator(function ($value) { | |||
if ('' === trim($value)) { | |||
throw new \Exception('The password must not be empty.'); | |||
throw new InvalidArgumentException('The password must not be empty.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chalasr It feels like a visual bug, so we're fixing the visual representation of the message, what do you think?
Thank you @yceruto. |
…rom exception messages in Symfony's commands (yceruto) This PR was merged into the 3.4 branch. Discussion ---------- [Console] By default hide the short exception trace line from exception messages in Symfony's commands | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - After #24131 this was in my contribution list since then. Maybe it should be taken as a good practice when we build console commands, **use the exception classes of the Console component as much as possible to show a better message style to the end user**. (See the before/after effect in the referenced PR) Commits ------- 11f3c45 Hide short exception trace by default
After #24131 this was in my contribution list since then.
Maybe it should be taken as a good practice when we build console commands, use the exception classes of the Console component as much as possible to show a better message style to the end user.
(See the before/after effect in the referenced PR)