Skip to content

Conversation

@Nyholm
Copy link
Member

@Nyholm Nyholm commented May 21, 2017

This will fix #168

@Nyholm Nyholm added this to the 1.6.0 milestone May 21, 2017
@Nyholm Nyholm requested a review from fbourigault May 21, 2017 17:00
->ifTrue(function ($config) {
return $config['factory'] === 'httplug.factory.auto' && !empty($config['config']);
})
->thenInvalid('You must specify a valid "factory" in order to use the "config"')
Copy link
Member

Choose a reason for hiding this comment

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

IMO this message is not really clear. What does "valid config" mean in this context?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you. Is it better now?

Copy link
Member

Choose a reason for hiding this comment

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

Looks better

*/
public function createClient(array $config = [])
{
return HttpClientDiscovery::find();
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it worth to fallback to HttpAsyncClientDiscovery if HttpClientDiscovery does not returned any implementation?

Copy link
Member Author

Choose a reason for hiding this comment

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

I doubt it. I believe it is very rare that an async adapter/client does not implement HttpClient interface (not async).

@Nyholm
Copy link
Member Author

Nyholm commented May 22, 2017

Thank you for the reviews.

@Nyholm Nyholm merged commit 8096f29 into master May 22, 2017
@fbourigault fbourigault deleted the issue-168 branch May 22, 2017 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make clients.acme.factory optional and use discovery instead

5 participants