php-http / curl-client

cURL client
http://httplug.io
MIT License
443 stars 28 forks source link

Make discovery a hard dependency #25

Closed Nyholm closed 8 years ago

Nyholm commented 8 years ago

Like we did in our other clients and adapters.

What do you think?

mekras commented 8 years ago

Why?

Nyholm commented 8 years ago

Because the diacovery is a lightweight package, we do not have to do checks if the discovery exists or not. It may also make the installation/download/bootstrap a bit easier.

And also, like I said above. All other clients and adapters have a hard dependency or no dependency.

mekras commented 8 years ago

Since in fact there is no actual dependency on discovery, I think it would be better to remove checks from the code.

Nyholm commented 8 years ago

Removing these: https://github.com/php-http/curl-client/blob/master/src/Client.php#L85-L90

Will make the constructor arguments non-optional.

I suggest doing as the Guzzle5 adapter does: https://github.com/php-http/guzzle5-adapter/blob/master/src/Client.php#L40

mekras commented 8 years ago

OK.

Nyholm commented 8 years ago

You are quick. Thank you!