我使用 “SNC / redis的束”: “3.0.0-RC1”
我更新symfony的2.8〜3.4
在控制器我有
$redis_cluster = $this->container->get('snc_redis.cluster');
$cached = $redis_cluster->get($resOneCacheName)
得到
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.
我怎么能得到的Redis服务?
停止直接使用容器和使用依赖注入代替。
见https://symfony.com/doc/3.4/service_container/3.3-di-changes.html