Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Bind GuzzleHttpClient as default client for Unleash. #29

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

robertatcd
Copy link
Contributor

#16 (comment)

(Finally :) )

From the suggestion by https://github.com/gsmofgsm in that thread.

This update provides GuzzleHttp\ClientInterface as the default client for Unleash.

In particular, it allows the use of the Facade without having to first bind Guzzle into the service container.

@@ -15,9 +18,9 @@ class ServiceProvider extends IlluminateServiceProvider
public function register()
{
$this->mergeConfigFrom($this->getConfigPath(), 'unleash');
$this->app ->when(Unleash::class)->needs(ClientInterface::class)->give(Client::class);
Copy link
Owner

@mxkxf mxkxf Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There looks to be a rogue space after app, is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharp eyes! I have pushed an update.

Copy link
Owner

@mxkxf mxkxf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @robertatcd!

@mxkxf mxkxf merged commit a31289f into mxkxf:master Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants