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

Skip to content

[Doctrine Bridge] document priority for doctrine.event_listener tag #9944

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

Closed
wants to merge 2 commits into from

Conversation

dmaicher
Copy link
Contributor

Fixes #7649

@HeahDude HeahDude added this to the 2.8 milestone Jun 21, 2018
.. code-block:: yaml

services:
my.listener.with_high_priority:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we please keep the naming convention here? e.g, using app.listener.high_priority? I would also remove My prefix on class names, I don't think we use such names elsewhere in the docs.

Copy link
Contributor Author

@dmaicher dmaicher Jun 22, 2018

Choose a reason for hiding this comment

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

I actually followed the naming convention (for the service id) of the other examples in this file 😉

If you want I can rename all of them?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, as this targets 2.8 why not, but then this would better be done in another PR. Let's wait for other maintainers opinion before making this change. Thanks!


services:
my.listener.with_high_priority:
class: AppBundle\EventListener\MyHighPriorityListener
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the scope of this PR but I don't think we should use the same namespace for kernel listener and doctrine listener (like form listeners should remain in App\Form\Listener).

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

I like this. I agree with Jules about some naming ... but I propose to merge this "as is" and then create a new PR to consistently fix all those issues. @dmaicher could you please make the remaining changes and rebase? Thanks!



Priorities for Event Listeners
--------------------------------
Copy link
Member

Choose a reason for hiding this comment

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

This line should be as long as its text above. Sorry, but the rst format is really picky.

Priorities for Event Listeners
--------------------------------

In case you have multiple listeners for the same event you can control the order in which they are invoked using the `priority` attribute on the tag. Listeners with a higher priority are invoked first.
Copy link
Member

Choose a reason for hiding this comment

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

Please, use double backticks to mark priority as <code>. Sorry, but it's rst format again :)

Priorities for Event Listeners
--------------------------------

In case you have multiple listeners for the same event you can control the order in which they are invoked using the `priority` attribute on the tag. Listeners with a higher priority are invoked first.
Copy link
Member

Choose a reason for hiding this comment

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

Please break this line into multiple 80-character lines. Thanks!

@dmaicher
Copy link
Contributor Author

dmaicher commented Sep 4, 2018

@javiereguiluz comments addressed 👍

@dmaicher
Copy link
Contributor Author

Can be merged? :)

@javiereguiluz
Copy link
Member

David, I'm sorry it took us so long to merge this. We've just did. Thanks for your contribution!

javiereguiluz added a commit that referenced this pull request Oct 15, 2018
…stener tag (dmaicher)

This PR was squashed before being merged into the 2.8 branch (closes #9944).

Discussion
----------

[Doctrine Bridge] document priority for doctrine.event_listener tag

Fixes #7649

Commits
-------

ed986b2 [Doctrine Bridge] document priority for doctrine.event_listener tag
@JarJak
Copy link
Contributor

JarJak commented Jan 24, 2019

This is wrong. Doctrine events does not care about priority. See doctrine/DoctrineBundle#157 (comment)

@dmaicher dmaicher deleted the patch-4 branch January 25, 2019 08:02
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.

5 participants