Giter Club home page Giter Club logo

Comments (5)

SunMar avatar SunMar commented on May 24, 2024

prooph/event-store-client then only has to rely on:

    "php": "^7.2",
    "ext-json": "*",
    "amphp/amp": "^2.0.7",
    "amphp/artax": "^3.0.14",
    "amphp/socket": "^0.10.9",
    "ramsey/uuid": "^3.7.3"

Though on a side note, isn't "ext-protobuf": "*", missing there? It's not optional, is it?

from event-store-client.

prolic avatar prolic commented on May 24, 2024

amphp/socket should be upgraded to 0.10.11 (bugfixes available).

ext-protobuf is required, that's correct, so let's add it. The problem is, that allegro/php-protobuf is needed and not protocolbuffers/protobuf from google, but both are claiming to be "ext-protobuf".

About useConsoleLogger() and useFileLogger() methods: I like to keep them, however we can make the dependencies for them optional. If you call one of these methods, we can simply check if the required class can be autoloaded, and if not throw an exception and tell the user to install the additional dependency in order to use it. On the other hand, I don't really fear a few additional dependencies. In case amphp/file 1.0 gets released, we can upgrade that dependency easily with a minor version bump.

@codeliner @enumag any thoughts on this?

from event-store-client.

enumag avatar enumag commented on May 24, 2024

They should be optional I think.

from event-store-client.

SunMar avatar SunMar commented on May 24, 2024

@prolic What is the reason you'd like to keep those two functions? Is it for easy of use, backwards compatibility or something else?

from event-store-client.

prolic avatar prolic commented on May 24, 2024

If you inject a normal psr logger like monolog, you make the app blocking again. Do you know how to setup a non blocking async console or file logger without looking at the details of those methods? If not, and if amphp is already hard to understand if you never wrote async php and if you don't know this library's API, you're much better off if such a thing is provided by default.

I would never inject a normal monolog instance here. Amphp did a great job providing an async logger that implements psr logger interface. If you need a custom backend (f.e. mongo) I'd prefer writing my own logger or at least my own writer for monolog. Don't use any default psr logger, it will work, but with downsides.

from event-store-client.

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.