Skip to content

Fixing inconcistency - subscribr to listener #10227

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
Sep 24, 2019

Conversation

kklecho
Copy link
Contributor

@kklecho kklecho commented Aug 27, 2018

There was incomplete subscriber class that looked like leftover. It has been provided with config snippet for listener.
I'm guessing recommendation changed from subscriber to listener, as it makes more sense here.

@xabbuh
Copy link
Member

xabbuh commented Aug 28, 2018

Wouldn't it make more sense to transform this example into a subscriber too?

@kklecho
Copy link
Contributor Author

kklecho commented Aug 29, 2018

I guess either listener or subscriber would be applied by the developer. The listener will be used 99% of the time so I'd stick to it and let the dev apply more sophisticated subscriber if needed. This part of the docs is not there to demonstrate the difference between the two so I wouldn't place both, the event dispatcher article serves this goal.

@xabbuh
Copy link
Member

xabbuh commented Aug 30, 2018

Well, the LocaleSubscriber example at the beginning of the page already is based on the EventSubscriberInterface. The advantage with this interface is that services implementing it can be autoconfigured. Without it, we would also need to show how to configure your service. That's why I would make this a proper event subscriber.

@kklecho
Copy link
Contributor Author

kklecho commented Sep 18, 2018

Please pardon delay. This is a good point, I have no strong opposing opinion. I'm unable to do the changes any soon myself, so I'd still apply this patch in order to make the documentation examples work and take it from there.

There was incomplete subscriber  class that looked like leftover. It has been provided with config snippet for listener.
I'm guessing recommendation changed from subscriber to listener, as it makes more sense here.
@javiereguiluz javiereguiluz changed the base branch from 4.1 to 4.3 September 24, 2019 15:50
@javiereguiluz javiereguiluz added this to the 4.3 milestone Sep 24, 2019
javiereguiluz added a commit that referenced this pull request Sep 24, 2019
This PR was submitted for the 4.1 branch but it was merged into the 4.3 branch instead (closes #10227).

Discussion
----------

Fixing inconcistency - subscribr to listener

There was incomplete subscriber  class that looked like leftover. It has been provided with config snippet for listener.
I'm guessing recommendation changed from subscriber to listener, as it makes more sense here.

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

dae171b Fixing inconcistency - subscribr to listener
@javiereguiluz javiereguiluz merged commit dae171b into symfony:4.3 Sep 24, 2019
@javiereguiluz
Copy link
Member

I finally merged this ... but reverted some changes to keep the subscriber, like in the beginning of the article. Thanks.

@kklecho kklecho deleted the patch-1 branch February 1, 2020 02:07
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