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
Remove exception docblock #151
Conversation
Remove exception docblock
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.
correct. looking at the psr-18 ClientInterface that we extend here, i think we should actually drop all code in here and make this
/**
* {@inheritdoc}
*
* Provide the Httplug HttpClient interface for BC. You should typehint Psr\Http\Client\ClientInterface in new code
*/
interface HttpClient extends ClientInterface
{
}
the method definition is a copy of the psr method and therefore does nothing. do you want to adjust this accordingly?
Done.. check again :) |
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.
@Nyholm am i missing something or is this what the interface should look like now?
Nope, We still throw HTTPlug exceptions. The exceptions however extends PSR18. Im 👎 |
To remove |
is there any value in explicitly stating that, however? imho people should be using the PSR-18 exception interfaces, not the ones from the HTTPlug BC layer. as the exceptions extend the PSR-18 interface, the phpdoc of the base interface is not wrong. |
If you are using a HTTPlug 2.0 client you may catch both HTTPlug exceptions and PSR18 exceptions.
|
@Nyholm so you would say we should add the method signature again to add the phpdoc for the httplug exceptions? |
I don't agree with that, catching an HTTPlug is now a detail of implementation in 2.0, and we should not spec this, as this will allow people to correctly depend on PSR 18 and completly remove our interface latter. |
@Nyholm are you okay to merge with this or do you disagree with the last comments from joel and me? |
I think according to PSR this exception should not be thrown... :/