Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Add domain exceptions to replace generic exceptions#14894
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
Uh oh!
There was an error while loading.Please reload this page.
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.
I'm not sure this is the correct behavior. The line is wrapped, but not the class name, and the rest of the line is filled with spaces.
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.
I thinkd should be on the same line asdefine.
GromNaN commentedJun 7, 2015
Any idea how to fix this failing test ? |
phansys commentedJun 7, 2015
AFAIK, the alternative names was originallyordered with |
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.
Please, check missing new lines at EOFs.
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.
Fixed.
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.
Missing leading \ on all@expectedException tags
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.
Can you fix this? We are using a leading\ everywhere else in Symfony for such PHPUnit annotations.
fabpot commentedAug 1, 2015
As you are moving exceptions to specific ones, what about doing it for the whole component? |
fabpot commentedSep 14, 2015
@GromNaN Any news on this one? Can you address the comments? |
GromNaN commentedSep 22, 2015
OK for moving remaining exception to specific ones. Is it necessary to keep the distinction between |
fabpot commentedSep 22, 2015
Yes, I think we need to keep the distinction here (at least to keep BC). |
GromNaN commentedSep 22, 2015
I'll create And the interface |
ae7d14d to515f392CompareReplace exception thrown by specific exception implementing thesame interface.
515f392 to63f5af6CompareGromNaN commentedSep 23, 2015
Rebased and made all changes. I still have this error on HHVM : |
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.
I would have named itCommandNotFoundException to be more consistent with other exception names in other components.
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.
That's close to theRouteNotFoundException from the Routing component. Have you something in mind ?
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.
CommandNotFoundException
fabpot commentedSep 24, 2015
I made some minor comments, but I'm 👍 on this change. ping @symfony/deciders |
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.
Here I've replaced the only instance of the basic\Exception by a more preciseLogicException.
dunglas commentedSep 24, 2015
👍 |
fabpot commentedSep 25, 2015
Thank you@GromNaN. |
xabbuh commentedSep 27, 2015
…test (xabbuh)This PR was merged into the 2.8 branch.Discussion----------[Console] don't rely on internal sort implementation om test| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#14894| License | MIT| Doc PR |PHP does not guarantuee how array elements with the same value will besorted when applying `asort()`. Since all namespaces used in the testproduce the same Levenshtein value, we should only check for presence ofthese namespaces instead of comparing the exact order.Commits-------3011fa0 don't rely on internal sort implementation in test
Creates domain specific exception classes for the case where a user type an invalid command name or option name.
TODO:
\InvalidArgumentExceptionbySymfony\Component\Console\Exception\InvalidArgumentExceptionSymfony\Component\Console\Exception\ExceptionInterface