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

Optimize Promise v3 API compatibility to avoid hitting autoloader #55

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

clue
Copy link
Member

@clue clue commented Mar 7, 2022

This minor changeset optimizes the Promise v3 API compatibility to avoid hitting the potentially expensive autoloader for each invocation. Instead of checking the CancellablePromiseInterface (removed in Promise v3 via reactphp/promise#75), this now uses the same checks (duck-typing) also present in the React\Promise\resolve() function. This also improves static analysis and IDE support as it will no longer reference a class that will no longer be available in Promise v3.

Builds on top of #54 and #37

@clue clue added this to the v1.9.0 milestone Mar 7, 2022
@clue clue requested a review from WyriHaximus March 7, 2022 15:24
Copy link
Member

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants