Skip to content
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

Increase event listener priority #1

Open
Teelevision opened this issue Feb 11, 2016 · 0 comments
Open

Increase event listener priority #1

Teelevision opened this issue Feb 11, 2016 · 0 comments

Comments

@Teelevision
Copy link

Both the ParamConverterListener (of the Sensio FrameworkExtraBundle; which loads entities via Doctrine) and your ActionEventListener have the priority 0, as far as I can see. To ensure that your listener is called first, set the priority in the service definition to something higher, for example 10.

Otherwise it could happen that the entities for an action are loaded before the transaction begins. Which then makes the action vulnerable to race conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant