You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the tag controller.argument_value_resolver, the argument_resolver.request service has a priority of 50, while doctrine.orm.entity_value_resolver has a priority of 110. As a result, EntityValueResolver from DoctrineBundle first tries to resolve the Symfony\Component\HttpFoundation\Request controller argument as an entity. This is nonsensical and will cause Doctrine to try to find an entity manager and repository for it. In my case this leads to an extra 40-50ms of Total execution time on average.
By changing the priority of argument_resolver.request to 150, the Request argument is resolved immediately without this detour.
How to reproduce
Create a clean installation of symfony/skeleton and require symfony/webapp-pack. Create a controller with a Request $request function argument and visit it. Inspect the Performance profiler page for the request.