Skip to content

Documentation improvement suggestions #63

@gubler

Description

@gubler

I wanted to give Prooph a try (I have use SimpleBus previously), mainly for the QueryBus support. In trying to set up a test Symfony app, I ran into some problems with the documentation. It took me a while to get everything working, but when I was done, these were the issues I found with the documentation:

As this is my first interaction with the Prooph service bus and this Symfony bundle, I wanted to bring these to the maintainer's attention for review before I went through the hassle of creating a pull request. I don't know if I missed something or possibly didn't understand something and wanted to get feedback first.

1. When using message_detection: true, your commands/events/queries have to implement the Message interface.

This is not explained in the documentation and all of the other Prooph documentation I found describes using Messages or plain PHP objects, or even plain strings. I can see why message_detection would require you to pass objects for determining the message map, but I don't see why they have to implement the Message interface. Either way, this should be called out in the documentation.

2. Handlers/Listeners Service Declaration must be Public

While this is actually called out in the documentation, I missed it originally, and the code examples do not include the public: true in the service declarations. I think this should be added to the examples.

3. Installation instructions do not include installing react/promise

If you create a QueryBus and have not installed react/promise, you get an exception. I am guessing the reason react/promise is not a dependency (and only a dev-dependency) is so it is not installed if the user doesn't generate a QueryBus. There should be some documentation that if you are going to use a QueryBus, you have to manually require react/promise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions