Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] Fix RequestContext not updated#41716
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas left a comment
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 don't have a better idea :(router.request_context is another stateful service we need to ditch!
finding a way to removeRequestContextAwareInterface would be great also...
src/Symfony/Component/Messenger/Middleware/RouterContextMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Middleware/RouterContextMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedJun 17, 2021
Thank you@jderusse. |
The
RouterContextMiddlewareupdates the context of the injectedRequestContextAwareInterfacebut this is wrong, the context object could have been injected in many services (ie. Router, UrlHelper).Calling
setContextupdates the context for one services, but all other services are still using the old one.This PR uses the injected
RequestContextAwareInterfaceto fetch the currentContextand then changes its properties.