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

[Extensions] extensions priority #79

Closed
dkarlovi opened this issue May 12, 2017 · 4 comments
Closed

[Extensions] extensions priority #79

dkarlovi opened this issue May 12, 2017 · 4 comments

Comments

@dkarlovi
Copy link
Contributor

I'm doing #69 in my app (will send a PR later) and ran into a problem.

My extension catches the Symfony user token and stores it properly in the processor's token storage. But, to be able to use it, I must merge the user with the Doctrine entity manager (user must be managed to be able to use in Blameable or similar), all this works.

Problem was: after I merged the user, DoctrineClearIdentityMapExtension came in and cleared the map so my onPreReceived() ended up being useless. I've worked this by disabling it and doing the same thing from my onPostReceived, but the problem still remains: extensions should be able to specify their priority.

Also, shouldn't DoctrineClearIdentityMapExtension clear the map from onPostReceived, not onPreReceived?

@makasim
Copy link
Member

makasim commented May 12, 2017

The priority already supported. Add priority attribute to symfony's tag with a number

@makasim makasim closed this as completed May 12, 2017
@makasim
Copy link
Member

makasim commented May 12, 2017

Also, shouldn't DoctrineClearIdentityMapExtension clear the map from onPostReceived, not onPreReceived?

I'd prefer to be sure the state is clean before I start processing the message

@dkarlovi
Copy link
Contributor Author

That's great, I've missed the priority part in the docs, thank you!

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

2 participants