Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:masterfromdirk39:fix-missing-bus-namestamp
May 1, 2019

Conversation

@dirk39
Copy link
Contributor

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#31200
LicenseMIT
Doc PRNot needed

Hi! I modified the behaviour of RoutableMessageBus to route message without BusNameStamp to default bus instead of raise an exception.

Made with ❤️ byOpen Source Saturday

@dirk39dirk39force-pushed thefix-missing-bus-namestamp branch 2 times, most recently from505cc53 toc15ba90CompareApril 28, 2019 18:16
Copy link
Contributor

@srozesroze left a 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));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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));
Copy link
Contributor

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.

@dirk39dirk39force-pushed thefix-missing-bus-namestamp branch 5 times, most recently from6ed20d8 to8513c4fCompareApril 29, 2019 20:03
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@weaverryanweaverryan mentioned this pull requestApr 30, 2019
36 tasks
@fabpotfabpotforce-pushed thefix-missing-bus-namestamp branch from8513c4f toc4e5e83CompareMay 1, 2019 08:06
@fabpot
Copy link
Member

Thank you@dirk39.

@fabpotfabpot merged commitc4e5e83 intosymfony:masterMay 1, 2019
fabpot added a commit that referenced this pull requestMay 1, 2019
…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 [![Open Source Saturday](https://img.shields.io/badge/%E2%9D%A4%EF%B8%8F-open%20source%20saturday-F64060.svg)](https://www.meetup.com/it-IT/Open-Source-Saturday-Milano/)Commits-------c4e5e83 [Messenger] RoutableMessageBus route to default bus
@fabpot
Copy link
Member

Comments addressed in2eda6ff

Tobion added a commit that referenced this pull requestMay 11, 2019
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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@srozesrozesroze approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

6 participants

@dirk39@fabpot@sroze@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp