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 #202

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

clue
Copy link
Member

@clue clue commented Jun 17, 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 #153, reactphp/promise-timer#54 and reactphp/promise-timer#55

@clue clue added this to the v1.10.0 milestone Jun 17, 2022
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