-
Notifications
You must be signed in to change notification settings - Fork 43
#75 Retry request on network failure #103
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
$response = parent::__doRequest($request, $location, $action, $version, $one_way); | ||
$response = parent::__doRequest($request, $location, $action, $version, $oneWay); | ||
if (null === $response) { | ||
return $this->__doRequest($request, $location, $action, $version, $oneWay); |
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.
This may cause an infinite loop. It's better to throw an exception instead and let the application decide what to do next. @johnzuk I'd suggest to add 'exceptions' => true
to default options here:
GusApi/src/GusApi/Client/Builder.php
Line 53 in a9f777f
$options = [ |
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.
For sure it can be like what - exception sound like best option here
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.
@bmxmale Also additional logic needs test coverage
@@ -4,9 +4,12 @@ | |||
|
|||
class SoapClient extends \SoapClient | |||
{ | |||
public function __doRequest($request, $location, $action, $version, $one_way = 0): string | |||
public function __doRequest($request, $location, $action, $version, $oneWay = false): string |
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 think it was historically named $one_way
and the type should be int
. It was changed in PHP 8 but we should support PHP 7.1+ https://www.php.net/manual/en/soapclient.dorequest.php#refsect1-soapclient.dorequest-changelog
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
No description provided.