Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] RoutableMessageBus route to default bus#31288
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
a3e17df to8fde9b3CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
505cc53 toc15ba90Compare
sroze left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Two comments.
| if (!$this->busLocator->has($busNameStamp->getBusName())) { | ||
| thrownewInvalidArgumentException(sprintf('Invalid busname "%s"on BusNameStamp.',$busNameStamp->getBusName())); | ||
| if (!$this->busLocator->has($busName)) { | ||
| thrownewInvalidArgumentException(sprintf('Busname "%s"does not exists.',$busName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| thrownewInvalidArgumentException(sprintf('Busname "%s" does notexists.',$busName)); | |
| thrownewInvalidArgumentException(sprintf('Busnamed "%s" does notexist.',$busName)); |
| { | ||
| $this->expectException(InvalidArgumentException::class); | ||
| $this->expectExceptionMessage('does not contain a BusNameStamp'); | ||
| $this->expectExceptionMessage(sprintf('Bus name "%s" does not exists.', MessageBusInterface::class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you move these to annotations instead actually? It's more readable.
6ed20d8 to8513c4fCompare8513c4f toc4e5e83Comparefabpot commentedMay 1, 2019
Thank you@dirk39. |
…irk39)This PR was squashed before being merged into the 4.3-dev branch (closes#31288).Discussion----------[Messenger] RoutableMessageBus route to default bus| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#31200| License | MIT| Doc PR | Not neededHi! I modified the behaviour of RoutableMessageBus to route message without BusNameStamp to default bus instead of raise an exception.Made with ❤️ by [](https://www.meetup.com/it-IT/Open-Source-Saturday-Milano/)Commits-------c4e5e83 [Messenger] RoutableMessageBus route to default bus
fabpot commentedMay 1, 2019
Comments addressed in2eda6ff |
This PR was merged into the 4.3 branch.Discussion----------[Messenger] Fix routable message bus default bus| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | none| License | MIT| Doc PR | not neededIn#31288, we gave the `RoutableMessageBus` a "default" bus. We did that by using the `MessageBusInterface` service in the locator. But, no such service exists - I think that was just a huge oversight (and maybe@dirk39 named a bus this in the project he was testing on?). The services in the locator are very simply the keys under `framework.messenger.buses` or the default, which is a single `messenger.bus.default` id. There is an alias in the container for `MessageBusInterface`, but this is not added to the locator (and adding it would be a bit awkward, as `MessengerPass` is in the component and the interface alias is entirely a framework thing).Cheers!Commits-------42e0536 Changing how RoutableMessageBus fallback bus works
Hi! I modified the behaviour of RoutableMessageBus to route message without BusNameStamp to default bus instead of raise an exception.
Made with ❤️ by