Coder Social home page Coder Social logo

QueryBus with Guzzle/Promises? about service-bus HOT 5 CLOSED

enumag avatar enumag commented on September 28, 2024
QueryBus with Guzzle/Promises?

from service-bus.

Comments (5)

prolic avatar prolic commented on September 28, 2024

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.

from service-bus.

codeliner avatar codeliner commented on September 28, 2024

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?

from service-bus.

enumag avatar enumag commented on September 28, 2024

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.

from service-bus.

prolic avatar prolic commented on September 28, 2024

from service-bus.

enumag avatar enumag commented on September 28, 2024

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.

from service-bus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.