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

Remove conditional from onRejected #26

Open
caseyamcl opened this issue Nov 27, 2020 · 0 comments
Open

Remove conditional from onRejected #26

caseyamcl opened this issue Nov 27, 2020 · 0 comments
Labels
refactor Refactor the code without changing behavior
Milestone

Comments

@caseyamcl
Copy link
Owner

Refactor this block to assume that the Create class exists:

            // ...

            // If made it here, then we have decided not to retry the request
            // Future-proofing this; remove when bumping minimum Guzzle version to 7.0
            if (class_exists('\GuzzleHttp\Promise\Create')) {
                return \GuzzleHttp\Promise\Create::rejectionFor($reason);
            } else {
                return rejection_for($reason);
            }

This will require updating the Guzzle dependency to v7, so this can't happen for a while.

@caseyamcl caseyamcl added this to the v3.0 milestone Nov 27, 2020
@caseyamcl caseyamcl added the refactor Refactor the code without changing behavior label Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor the code without changing behavior
Projects
None yet
Development

No branches or pull requests

1 participant