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

Promises v3 Checklist #1149

Open
7 tasks done
valzargaming opened this issue Jul 13, 2023 · 4 comments
Open
7 tasks done

Promises v3 Checklist #1149

valzargaming opened this issue Jul 13, 2023 · 4 comments
Labels
dependencies Pull requests that update a dependency file enhancement

Comments

@valzargaming
Copy link
Contributor

valzargaming commented Jul 13, 2023

Per https://github.com/reactphp/promise/releases/tag/v3.0.0

Irrelevant:

  • Existing instances of FulfilledPromise and RejectedPromise classes must be updated to use resolve() and reject() functions instead
  • Existing instances of LazyPromise should be removed
  • Any instances of some(), map(), and reduce() functions must be replaced with the any() or all() functions (I don't think we use these)

Breaking changes:

Non-breaking changes:

  • otherwise() and always() are deprecated, replaced by catch() and finally() (only instance I could find was Discord.php)
@valzargaming valzargaming added enhancement dependencies Pull requests that update a dependency file labels Jul 13, 2023
@key2peace
Copy link
Collaborator

All this should be in https://github.com/discord-php/DiscordPHP/tree/promise-v3 now

@valzargaming
Copy link
Contributor Author

ExtendedPromiseInterface extends PromiseInterface, and Promise v2 implements ExtendedPromiseInterface, so instead of replacing the existing typehinting to PromiseInterface we could just use React\Promise\Promise, which would overcome the hurdle and be better for futureproofing code. This seems to be the ReactPHP developers' intent as well, given they have made all classes final to encourage composition.

@shehi
Copy link
Contributor

shehi commented Jul 31, 2023

It's painful to read this @valzargaming :) Code-ify more please.

@valzargaming
Copy link
Contributor Author

It's painful to read this @valzargaming :) Code-ify more please.

This is already coded in the promises v3 branch as of today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

No branches or pull requests

3 participants