I would remove the container dependency altogether and add a `setRequest(Request $request = null)` method instead. This will allow the container to automatically inject the correct Request object and others would need to call the setRequest() method by themselves.

You can have a look at a similar implementation in `LocaleListener` for instance. But basically, here is the `setRequest()` method:

```php
public function setRequest(Request $request = null)
{
    $this->request = $request;
}
```

And call the method in the container configuration:

```xml
<call method="setRequest"><argument type="service" id="request" on-invalid="null" strict="false" /></call>
```

As the request can be null (outside request handling), you should take care of that edge case in your code.