Skip to content
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

Fix exponential backoff attribute #342

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Fix exponential backoff attribute #342

merged 1 commit into from
Dec 4, 2023

Conversation

boryn
Copy link
Contributor

@boryn boryn commented Dec 3, 2023

$useExponentialBackoff needs to be defined as null, as otherwise when $useExponentialBackoff is only specified at the connector level, this line:

$useExponentialBackoff = $request->useExponentialBackoff ?? $this->useExponentialBackoff ?? false;

will evaluate false, as it has default false value for the request class (inherited from HasTries trait)

@Sammyjo20
Copy link
Member

Thanks @boryn!

@Sammyjo20 Sammyjo20 merged commit d6f38f3 into saloonphp:v3 Dec 4, 2023
14 checks passed
@boryn
Copy link
Contributor Author

boryn commented Dec 4, 2023

PS. It's a breaking change between 3.3.0 and 3.3.1. If somebody already defined public bool $useExponentialBackoff in connector / request it will demand a slight change in the definition to (nullable ?bool):
public ?bool $useExponentialBackoff

@Sammyjo20
Copy link
Member

Oh, whoops. Really sorry I didn’t notice that @boryn. I’ll add it to the release notes but it could be considered a hotfix for the recent release.

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.

2 participants