-
Notifications
You must be signed in to change notification settings - Fork 4
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
Document IllegalArgumentException as throwable in EntityIdFormatter #213
Conversation
src/EntityId/EntityIdFormatter.php
Outdated
@@ -17,6 +17,7 @@ interface EntityIdFormatter { | |||
* @param EntityId $value | |||
* | |||
* @return string Either plain text, wikitext or HTML. | |||
* @throws \IllegalArgumentException |
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 please add half a sentence when this exception is thrown?
.travis.yml
Outdated
@@ -4,7 +4,7 @@ matrix: | |||
fast_finish: true | |||
include: | |||
- env: DM=~6.3 | |||
php: hhvm | |||
php: hhvm-3.30 |
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.
This change appears to be unrelated. It's not mentioned in the commit message or the Phabricator ticket.
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.
It happens that current hhvm nightly does not support current version of composer (and soon enough not php). Travis was failing due to that.
This can be done in a separate PR, but think it's fine for this library to be done here since it's done in a separate commit.
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.
Sure, I just wanted to have the reason documented. :-)
src/EntityId/EntityIdFormatter.php
Outdated
@@ -17,6 +17,7 @@ interface EntityIdFormatter { | |||
* @param EntityId $value | |||
* | |||
* @return string Either plain text, wikitext or HTML. | |||
* @throws \IllegalArgumentException when value falls out of supported patterns by the formatter |
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.
Not on a dev machine so I can't check - should this not be InvalidArgumentException? That is what the phab ticket says
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.
yes my bad .. fixed now
Bug: https://phabricator.wikimedia.org/T207479