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
Fully document the ProviderInterface #273
Fully document the ProviderInterface #273
Conversation
* @param array $result | ||
* @return void | ||
*/ | ||
public function errorCheck(array $result); |
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.
@ramsey This method was missing from the interface. As per our discussion earlier about the error handling flow, I plan to modify this method (and name it better).
@ramsey I'm not sure why this build failed only on HHVM... any clue? |
The failure message on HHVM is:
I'm not sure why it's specific to HHVM, though. |
@ramsey found the issue, it's a HHVM bug: sebastianbergmann/phpunit-mock-objects#223 and facebook/hhvm#5170. Should I apply the work around (define the methods in the abstract class) or are we okay with breaking HHVM usage? |
Is this only because our mock provider doesn't fully implement all the methods? Or is it a general issue with abstract classes in HHVM, where they always need to implement the full interface? If it's only an issue with our mock provider for the tests, then please define the methods in the mock object for the test. Otherwise, let's think about it for a bit. I want to follow up with HHVM folks to see if this is something they'll be fixing in future versions. |
@ramsey based on the HHVM issue I referenced, it looks like they intend to fix it, but have no timeline for doing so. I think the best thing to do for now would be to implement all the methods in the abstract. |
Okay. That's fine. When HHVM does fix it, we can remove them. |
Move existing documentation from `AbstractProvider` and fill in any missing docblocks.
*/ | ||
// Implementing these interfaces methods should not be required, but not | ||
// doing so will break HHVM because of https://github.com/facebook/hhvm/issues/5170 | ||
// Once HHVM is working, delete the following abstract methods. |
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.
@ramsey added here as a separate commit that can be reverted in the future.
Strange the coverage decreased, since no actual code was modified. I guess it's because of the added abstract methods. Also, I made a quick script to check these after I kept missing methods. |
Thanks! |
Fully document the ProviderInterface
Move existing documentation from
AbstractProvider
and fill in any missing docblocks.