Skip to content

RFC: messageName() method is abstract by default #72

Description

@prolic

I would like to propose that the messageName() method is abstract by default (which means you have to implement it on every class). The MessageFactory hence needs a message map, in order to create an object from message data, because the messageName doesn't have to be the class name. Class name as messsage name by default is removed.

Reasons:

  • for prooph/event-store-client we need messageMap anyway
  • it allows custom message names by default, lots of users asked on how not to have class name as message name and needed to write custom message factories in order to do this. Even with blog posts about this out there, the question came again and again. Actually nobody I'm aware of wants to have the class name as message name, hence why not change it now?

Thoughts?

@enumag @fritz-gerneth @basz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions