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

Promise 3.x compatibility #11

Closed

Conversation

ProCycleDev
Copy link

@ProCycleDev ProCycleDev commented Aug 13, 2024

This project can be marked as compatible with react/promise 3.x and 2.x by addressing a depreciation with FulfilledPromise and RejectedPromise classes.

These internal classes were marked as depreciated in 2.8.0 and to be removed in 3.0.0.
They are the only depreciated pieces of code that was removed in 3.0.0.

These changes have been tested with the latest version of opensearch-project/opensearch-php on PHP 8.1

@stof
Copy link

stof commented Aug 14, 2024

As FutureInterface extends PromiseInterface which has additional methods in 3.x, this should probably be a new major version (supporting only 3.x) so that the signature of FutureInterface for a given version of ringphp does not depend on the installed version of react/promise.

And implementations of FutureInterface need to be updated to implement the new methods as well.

These changes have been tested with the latest version of opensearch-project/opensearch-php on PHP 8.1

have you actually checked that your tests were using react/promise 3.x ? This is weird as the behavior would have been a fatal error normally

@ProCycleDev
Copy link
Author

ProCycleDev commented Aug 14, 2024

Yep you're right it was still 2.x
Broken on 3.x

I'm very confused because PromisorInterface is gone in 3.x but there is no mention at all about depreciation of it in the 2.x or 3.x changelog

@ProCycleDev
Copy link
Author

Closing this PR as I do not have the skill to fix this for 3.x

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

Successfully merging this pull request may close these issues.

2 participants