Yes but you could keep the container as a constructor parameter and only extract the bucket you want like that : 

```php
public function __construct($container)
{
    $clusterServiceId = $container->get("%kbrw.riak.session.cluster.service.id%");
    $bucketName = $container->get("%kbrw.riak.session.bucket.name%");
    if (empty($bucketName) || !$container->has($clusterServiceId)) {
        throw new InvalidArgumentException("RiakSessionHandler - Missing cluster (with id '$clusterServiceId') or bucket name. Please check your configuration.");
    }
    $this->sessionBucket = $container->get($clusterServiceId)->getBucket($bucketName);
}
```

With that, you don't have keep the full container instance as a strong dependency. It will ease your tests, speed up (a bit) your implementation and allow you to be more flexible and use it outside the Symfony Dependency injector Component.