Skip to content
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

Feature/string message initializer plugin #82

Merged
merged 2 commits into from Oct 20, 2015
Merged

Feature/string message initializer plugin #82

merged 2 commits into from Oct 20, 2015

Conversation

bweston92
Copy link
Member

What's this PR do?

When a message is dispatched and is a string the message contents will be set the to the message name so the router doesn't receive "string" as the dispatched message.

Any background context you want to provide?

I was using strings to represent query commands instead of making query classes. How-ever by default the router uses "get_type" on the dispatched message, this makes the router look for "string" how-ever I need to to be the original sting value I dispatched when the router asks for message name.

Definition of Done:

  • Tested in a real world application.
  • There appropriate test coverage.
  • Documentation.

@codeliner codeliner added this to the 4.6 Release milestone Oct 20, 2015
@codeliner
Copy link
Member

docs are covered with #83

@codeliner
Copy link
Member

@bweston92 good job, thx

codeliner added a commit that referenced this pull request Oct 20, 2015
…zer-plugin

Feature/string message initializer plugin
@codeliner codeliner merged commit 0c0f502 into prooph:develop Oct 20, 2015
use Prooph\Common\Event\DetachAggregateHandlers;
use Prooph\ServiceBus\MessageBus;

final class StringMessageInitializerPlugin implements ActionEventListenerAggregate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not sure if we wan't to have a plugin for this. This behaviour should be part of the service bus by default. Thoughts @codeliner ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prolic for 4.* as plugin and 5.* as default behavior. documented in #84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants