-
Notifications
You must be signed in to change notification settings - Fork 50
Allow you to skip the factory keyword. #170
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
Conversation
| ->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"') |
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.
IMO this message is not really clear. What does "valid config" mean in this context?
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.
Thank you. Is it better now?
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.
Looks better
| */ | ||
| public function createClient(array $config = []) | ||
| { | ||
| return HttpClientDiscovery::find(); |
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.
Does it worth to fallback to HttpAsyncClientDiscovery if HttpClientDiscovery does not returned any implementation?
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.
I doubt it. I believe it is very rare that an async adapter/client does not implement HttpClient interface (not async).
|
Thank you for the reviews. |
This will fix #168