-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Inherit phpdoc from OutputFormatterInterface #22342
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
ro0NL
commented
Apr 7, 2017
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #22225 (comment) |
License | MIT |
Doc PR | symfony/symfony-docs#... |
* | ||
* @return OutputFormatterStyleInterface | ||
* | ||
* @throws \InvalidArgumentException When style isn't defined |
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.
let me know if this need to be added to the interface (see also #22231).
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 say it should be. unrelated but this should use the console domain exception instead
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.
personally i never add logic ones to the interface.. only concrete runtime scenarios that all implementations must adhere to (SomethingIsWrongException
). But this is a thin line in PHP so i dont mind, hence i asked :)
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.
let's see what others think then :)
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.
to clarify.. i always follow; logic=programmers fault, runtime=program fault
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.
given the actual implementation is a program fault.. i think im gonna add it. I would have used StyleNotFoundException extends \RuntimeException
. But that's semantics.. who cares :P
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.
👍
Thank you @ro0NL. |
…ro0NL) This PR was merged into the 2.7 branch. Discussion ---------- [Console] Inherit phpdoc from OutputFormatterInterface | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22225 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> Commits ------- ff3cb9c [Console] Inherit phpdoc from OutputFormatterInterface