-
Notifications
You must be signed in to change notification settings - Fork 3
Update composer.json #5
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
base: master
Are you sure you want to change the base?
Conversation
Added needed dependency
Added the parameter HTTPOptions to configure the GuzzleClient. Fixed the error handling to report better errors, when there is no response to the request.
|
I added a way to prevent GuzzleClient to check SSL verification, because I had to access an API that had no valid SSL anymore (the API wil be closed soon - Contao will replace it, so renewing the cert does not make sense anymore) |
Defcon0
left a comment
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.
Thanks for your efforts. I guess after these changes we have it ;-)
| $options['verify'] = false; | ||
| } | ||
|
|
||
| $event = $this->eventDispatcher->dispatch(BeforeAuthenticationEvent::NAME, new BeforeAuthenticationEvent($auth, $this->sourceModel)); |
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.
Could you please replace auth by options and fix the getter and setter; Afterwards please pass $event->getOptions() to storeValueToRemoteCache() and getContentFromUrl(). Then I guess we have it :-) Thanks for your support!
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.
Could you please rename the event to ModifySourceHttpClientOptionsEvent since this makes more sense. This way we can modify all options of guzzle and not only auth settings.
| } | ||
|
|
||
| protected function getContentFromUrl(string $method, string $url, array $auth = [], array $HTTPClientOptions = []): array | ||
| protected function getContentFromUrl(string $method, string $url, array $options = []): array |
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.
Please rename $options to $httpClientOptions since we might have a general $options array sometimes. (same below)
Added needed dependency
Since the Client is used in src/Source/AbstractSource.php as a Client this should be a prod dependency.