title: Symfony construct() must implement interface Symfony\Component\DependencyInjection\ContainerInterface, none given
body: <p>I can't understand this error. I tried all things but can't solve this. Can someone tell me where is my fault please .</p>
  
  <p>The error : </p>
  
  <blockquote>
    <p>FatalThrowableError in MemcachedCacheProvider.php line 14: Type error:
    Argument 1 passed to
    AppBundle\Data\CacheProvider\MemcachedCacheProvider::__construct()
    must implement interface
    Symfony\Component\DependencyInjection\ContainerInterface, none given,
    called in ...app\cache\dev\appDevDebugProjectContainer.php on line 373</p>
  </blockquote>
  
  <p>MemcachedCacheProvider.php ;</p>
  
  <pre><code>    &lt;?php
  
      namespace AppBundle\Data\CacheProvider;
  
      use AppBundle\Data\Interfaces\ICacheProvider;
      use AppBundle\Data\Interfaces\ICacheItem;
      use Symfony\Component\DependencyInjection\ContainerInterface;
  
      class MemcachedCacheProvider implements ICacheProvider
      {
          /** @var ContainerInterface */
          protected $_container;
  
          public function __construct(ContainerInterface $container) {
              $this-&gt;_container = $container;
          }
  public function GetItem($cacheKey)
      {
          $result = $this-&gt;_container-&gt;get('beryllium_cache.client')-&gt;get($cacheKey);
          if($result === null
              || !$result)
              return null;
  
          return $result;
      }
  
      public function GetItems(array $cacheKeys)
      {
          $cachedItems = array();
          $cache = $this-&gt;_container-&gt;get('beryllium_cache.client');
  
          foreach($cacheKeys as $key) {
              $item = $cache-&gt;get($key);
  
              if($item === null || !$item)
                  return null;
  
              $cachedItems[] = $item;
          }
  
          if(count($cachedItems) == 0)
              return null;
  
          return $cachedItems;
      }
  
      public function RemoveItem($cacheKey)
      {
          $this-&gt;_container-&gt;get('beryllium_cache.client')-&gt;delete($cacheKey);
      }
  
      public function RemovePrefix($namespaceKey)
      {
          //Used namespaces for memcache, so incrementing namespace value will now work as removing prefix
          $this-&gt;_container-&gt;get('beryllium_cache.client')-&gt;increment($namespaceKey);
  
          //TODO: No solution for removing items by prefix in memcached. Flushing cache!
          //$this-&gt;_container-&gt;get('beryllium_cache.client')-&gt;flush();
      }
  
      public function SetItem(ICacheItem $cacheItem)
      {
          if($cacheItem-&gt;GetItem() === null)
              return;
  
          $this-&gt;_container-&gt;get('beryllium_cache.client')-&gt;set($cacheItem-&gt;GetKey(), $cacheItem, ($cacheItem-&gt;GetExpireTimeStamp() == 0 ? 0 : ($cacheItem-&gt;GetExpireTimeStamp()-time())));
      }
  
      public function SetItems(array $items, $expireTimeStamp)
      {
          $cache = $this-&gt;_container-&gt;get('beryllium_cache.client');
  
          foreach($items as &amp;$item) {
              $cache-&gt;set($item-&gt;GetKey(), $item, ($expireTimeStamp == 0 ? 0 : ($expireTimeStamp-time())));
          }
      }
  
      public function GetNamespace($namespaceKey)
      {
          $ns = $this-&gt;GetItem($namespaceKey);
  
          if(empty($ns)) {
              //generate a random value to use as namespace and store it
              $ns = mt_rand();
  
              $this-&gt;_container-&gt;get('beryllium_cache.client')-&gt;set($namespaceKey, $ns, 0);
          }
  
          return $ns;
      }
  </code></pre>
  
  <p>And the services.yml ;</p>
  
  <pre><code>ayon_app.cacheprovider:
          class: AppBundle\Data\CacheProvider\MemcachedCacheProvider
          arguments: ["@service_container"]
  </code></pre>