snc/redis捆绑包在控制器中获取redist群集-symfony 3+;

snc/redis捆绑包在控制器中获取redist群集-symfony 3+;,symfony,Symfony,我使用“snc/redis捆绑包”:“3.0.0-RC1” 我将symfony 2.8更新为3.4 在控制器中,我有 $redis_cluster = $this->container->get('snc_redis.cluster'); $cached = $redis_cluster->get($resOneCacheName) 得到 如何获得redis服务 停止直接使用容器,改用依赖项注入 看 The "snc_redis.cluster" service or a

我使用“snc/redis捆绑包”:“3.0.0-RC1”

我将symfony 2.8更新为3.4

在控制器中,我有

$redis_cluster = $this->container->get('snc_redis.cluster');

$cached = $redis_cluster->get($resOneCacheName) 
得到

如何获得redis服务

停止直接使用容器,改用依赖项注入

The "snc_redis.cluster" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.