-
Notifications
You must be signed in to change notification settings - Fork 56
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
QueryBus with Guzzle/Promises? #174
Comments
This would be a BC break and can only be done with new major release. But you can also copy paste the query bus implementation and make your desired adjustments, if you need it. |
We hoped to see a promise PSR but async-interop group failed :( If someone has an idea how we can use a promise interface only and make it possible to work with different promise implementations this would be a good reason for a new major version. But switching promise implementation is not an option. Can't you use a react promise to guzzle promise converter? |
I understand - and agree. I was quite confused that there is no Promise PSR yet to be honest.
Maybe, I don't know enough about promises to try that. |
We could add an own promise interface and provide different implementations
that aggregate whatever needed. Kind of like httplug does.
…On Dec 3, 2017 02:43, "Jáchym Toušek" ***@***.***> wrote:
I understand - and agree. I was quite confused that there is no Promise
PSR yet to be honest.
Can't you use a react promise to guzzle promise converter?
Maybe, I don't know enough about promises to try that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#174 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYEvFjUgDaJiofcR5elisnQf-qH1lciks5s8ZpdgaJpZM4QvC0L>
.
|
I talked with a friend who explained to me how promises work. Now I see that the example code I linked in the first post will only work if the promise is a FulfilledPromise. So it doesn't make sense to use promises at all since I don't use any non-blocking API to get the results anyway - shame but PHP database API is not really made for that. So what I'll try to do instead is to write a QueryBus which won't use promises at all. |
Is it possible to somehow use QueryBus with Guzzle/Promises?
The main reason why I'd like to use Guzzle promises is the synchrionous
wait
method. From the examples I found for QueryBus it seems we need to get the result withwhich is quite disgusting imo. If there is some nicer way, please tell me.
Also Guzzle promises have more installations on packagist (by far the most installations among all php promise libraries) and implement Promises/A+ where as React only implements the older Promises/A spec.
The text was updated successfully, but these errors were encountered: