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

Support for AMPHP v3 #1064

Closed
stof opened this issue Feb 2, 2023 · 8 comments
Closed

Support for AMPHP v3 #1064

stof opened this issue Feb 2, 2023 · 8 comments
Milestone

Comments

@stof
Copy link
Contributor

stof commented Feb 2, 2023

Currently, grumphp requires AMPHP v2. It would be great if it could support both v2 and v3 to avoid blocking upgrades in projects using grumphp.

@veewee
Copy link
Contributor

veewee commented Feb 2, 2023

Idd surely accept a PR for that.

Currently, amphp/parallel (and parallel-functions) doesnt have a stable release yet - so we're kinda waiting on that.

Not sure if it is possible to support both v2 and v3 at the same time, since the whole API of amp has changed.
Our TaskHandler system relies on amp v2 Promise, which has been replaced by Future in v3 for example.

So, unless there are better ideas, I guess the best thing to do here is changing the API in grumphp v2 and let it use amp 3 Futures.

@veewee
Copy link
Contributor

veewee commented Feb 21, 2023

Good news, an amp 3 compatible version of parallel has been released
https://github.com/amphp/parallel/releases/tag/v2.0.0

@stof
Copy link
Contributor Author

stof commented Feb 22, 2023

but parallel-functions does not have a compatible version yet

@trowski
Copy link

trowski commented Apr 27, 2023

So I've had this page open on my laptop for about 2 months now, meaning to say I'd be happy to help transition this package to use amphp/parallel instead of amphp/parallel-functions as no further versions of that package is planned.

@stof You opening an issue kicked me to actually make a post. I'm not sure when I could promise any time, but I'd be happy to answer questions if someone more familiar with the library wants to tackle it first.

@veewee
Copy link
Contributor

veewee commented Apr 28, 2023

Thanks for jumping on on the discussion @trowski.
Really love the work you (and the rest of the team) did on amp!

I'm planning to play around with amp v3 and GrumPHP for the rest of the day.
This will probably result in a draft PR on which we can discuss how to do specific things.

@stof
Copy link
Contributor Author

stof commented Apr 28, 2023

@trowski actually, opening the issue on amphp/parallel-functions was in relation to this issue 😄

@veewee
Copy link
Contributor

veewee commented Apr 28, 2023

A small update: I think I covered all existing grumphp cases with amp v3 in the PR #1084.

I was able to throw away a lot of strange quirks I needed to add to get things like stop-on-failure and parallel-functions to work in v2 of amp. It's nice to see how much the project has improved! Great stuff!

Feel free to go through the PR and suggest improvements if I missed or misused anything :)

@veewee
Copy link
Contributor

veewee commented May 18, 2023

Feel free to play around with the v2.x branch;
I'm planning to add some other breaking changes before releasing it. In the meantime : all feedback is welcome.

@veewee veewee closed this as completed May 18, 2023
@veewee veewee added this to the 2.0.0 milestone May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants