-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[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
Conversation
.. code-block:: yaml | ||
|
||
services: | ||
my.listener.with_high_priority: |
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.
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.
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.
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?
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.
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 |
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.
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
).
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.
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 | ||
-------------------------------- |
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.
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. |
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.
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. |
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.
Please break this line into multiple 80-character lines. Thanks!
@javiereguiluz comments addressed 👍 |
Can be merged? :) |
David, I'm sorry it took us so long to merge this. We've just did. Thanks for your contribution! |
This is wrong. Doctrine events does not care about priority. See doctrine/DoctrineBundle#157 (comment) |
Fixes #7649