Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Only subscribe to a given bus from the MessageSubscriber #28275

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

Merged
merged 1 commit into from
Aug 28, 2018

Conversation

sroze
Copy link
Contributor

@sroze sroze commented Aug 26, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR ø

#27275 introduced the ability to listen to only a few buses from the handler tag. This adds that ability directly from the message subscriber.

It has also highlighted to me that most of the configuration can be done using yield (like the example I've added in this PR's tests) and that we could remove the support for other ways (especially the obscure return [['method', -10]] syntax) but I believe this should be done in another pull-request (that I'm happy to do after this one).

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(just wondering: what happens when there's a typo in the bus name? exception for bus not found?)

@sroze sroze force-pushed the only-subscribe-to-a-given-bus branch from e27885d to f60e409 Compare August 27, 2018 11:34
@sroze
Copy link
Contributor Author

sroze commented Aug 27, 2018

@nicolas-grekas good point, I've added this scenario in a test 👌

@sroze sroze merged commit f60e409 into symfony:master Aug 28, 2018
sroze added a commit that referenced this pull request Aug 28, 2018
…sageSubscriber (sroze)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Only subscribe to a given bus from the MessageSubscriber

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ø

#27275 introduced the ability to listen to only a few buses from the handler tag. This adds that ability directly from the message subscriber.

It has also highlighted to me that most of the configuration can be done using `yield` (like the example I've added in this PR's tests) and that we could remove the support for other ways (especially the obscure `return [['method', -10]]` syntax) but I believe this should be done **in another pull-request** (that I'm happy to do after this one).

Commits
-------

f60e409 Only subscribe to a given bus from the MessageSubscriber
@sroze sroze deleted the only-subscribe-to-a-given-bus branch August 28, 2018 12:44
fabpot added a commit that referenced this pull request Aug 29, 2018
…nfiguration (sroze)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Remove the "obscure" message subscriber configuration

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ø
| License       | MIT
| Doc PR        | ø

As described in #28275, all of the configuration can be done using yield and that we could remove the support for other ways (especially the obscure return `[['method', -10]]` syntax) as I believe this would clarify the configuration a lot.

Commits
-------

cf2ad86 Remove the "obscure" message subscriber configuration
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Nov 1, 2018
This was referenced Nov 3, 2018
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.

4 participants