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

[RFC] Remove unneeded PromisorInterface #220

Merged
merged 1 commit into from
May 31, 2022

Conversation

clue
Copy link
Member

@clue clue commented May 17, 2022

This simple changeset suggests removing the unneeded PromisorInterface (not to be confused with PromiseInterface which remains unchanged!). This is done in an attempt to reduce the API surface and make the API less confusing and easier to understand. On top of this, this means our APIs are closer to ES6 promises commonly used in JavaScript (see also #219).

In particular, its description currently reads "provides a common interface for objects that provide a promise". While technically correct, I consider this to be misleading as most "objects that provide a promise" as a return value (think an async connect() or fetch() method) would not implement this interface at all.

Empirical evidence suggests this interface isn't used much in our ecosystem either, so I'd rather use the chance to clean up our API surface with the upcoming Promise v3 release.

Like #219, I'm filing this as an RFC to get more feedback on this interface and to see how others feel about this. If this gets merged, I'll file a follow-up PR to deprecate this interface for Promise v2 to ease upgrading.

@clue clue added the BC break label May 17, 2022
@clue clue added this to the v3.0.0 milestone May 17, 2022
@clue clue requested review from jsor and WyriHaximus May 17, 2022 20:58
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.

Honestly? I never ever used this, noir will I ever do 👍

@WyriHaximus WyriHaximus merged commit 4bc784e into reactphp:3.x May 31, 2022
@clue clue deleted the no-promisor branch June 1, 2022 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants