When I try to inject the @request into any of my services, I get this exception:
ScopeWideningInjectionException: Scope Widening Injection detected:
If you can't use RequestStack directly, you could create a factory service that returns the current request using RequestStack.
# services.yml
app.request:
class: Symfony\Component\HttpFoundation\RequestStack
factory: [ @request_stack, getCurrentRequest ]
Then you can access the current request using the app.request service.