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

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@gmponos
Copy link

gmponos commented Jan 21, 2019

I think according to PSR this exception should not be thrown... :/

Remove exception docblock
Remove exception docblock
@dbu
Copy link
Contributor

dbu left a comment

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?

@gmponos

This comment has been minimized.

Copy link
Author

gmponos commented Jan 21, 2019

do you want to adjust this accordingly?

Done.. check again :)

@dbu

dbu approved these changes Jan 21, 2019

Copy link
Contributor

dbu left a comment

@Nyholm am i missing something or is this what the interface should look like now?

@Nyholm

This comment has been minimized.

Copy link
Member

Nyholm commented Jan 21, 2019

Nope, We still throw HTTPlug exceptions. The exceptions however extends PSR18.

Im 👎

@gmponos

This comment has been minimized.

Copy link
Author

gmponos commented Jan 21, 2019

Hmm.. I missed that.. @Nyholm is correct... So shall I revert here before @dbu comment...

are you all good with this?

@Nyholm

This comment has been minimized.

Copy link
Member

Nyholm commented Jan 21, 2019

To remove \Exception and update the description on the other line makes sense, yes.

@dbu

This comment has been minimized.

Copy link
Contributor

dbu commented Jan 22, 2019

We still throw HTTPlug exceptions. The exceptions however extends PSR18.

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.

@Nyholm

This comment has been minimized.

Copy link
Member

Nyholm commented Jan 25, 2019

If you are using a HTTPlug 2.0 client you may catch both HTTPlug exceptions and PSR18 exceptions.

imho people should be using the PSR-18 exception interfaces
Sure, and they may.

@dbu

This comment has been minimized.

Copy link
Contributor

dbu commented Jan 25, 2019

@Nyholm so you would say we should add the method signature again to add the phpdoc for the httplug exceptions?

@joelwurtz

This comment has been minimized.

Copy link
Member

joelwurtz commented Feb 3, 2019

If you are using a HTTPlug 2.0 client you may catch both HTTPlug exceptions and PSR18 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment