[RFC] Remove unneeded PromisorInterface#220
Merged
WyriHaximus merged 1 commit intoreactphp:3.xfrom May 31, 2022
Merged
Conversation
jsor
approved these changes
May 18, 2022
WyriHaximus
approved these changes
May 31, 2022
Member
WyriHaximus
left a comment
There was a problem hiding this comment.
Honestly? I never ever used this, noir will I ever do 👍
This was referenced Jun 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This simple changeset suggests removing the unneeded
PromisorInterface(not to be confused withPromiseInterfacewhich 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()orfetch()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.