Skip to content

Remove conditional from onRejected #26

@caseyamcl

Description

@caseyamcl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorRefactor the code without changing behavior

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions