sonata-project / cache

[Deprecated] Cache library
https://github.com/sonata-project/cache
MIT License
332 stars 29 forks source link

Memcached Adapter is not conforming to CacheAdapterInterface #100

Closed shehabic closed 6 years ago

shehabic commented 6 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
# Put the result here.

Symfony packages

$ composer show --latest 'symfony/*'
# Put the result here.

PHP version

$ php -v
# Put the result here.

Subject

Memcached Adapter is not conforming to CacheAdapterInterface the following:

    /**
     * {@inheritdoc}
     */
    public function get(array $keys)
    {
        return $this->handleGet($keys, $this->getCollection()->get($this->computeCacheKeys($keys)));
    }

should be:

    /**
     * {@inheritdoc}
     */
    public function get(array $keys): CacheElementInterface
    {
        return $this->handleGet($keys, $this->getCollection()->get($this->computeCacheKeys($keys)));
    }

Steps to reproduce

Just run anything that instantiates and uses Memcached Adapter, and you'll endup with Fatal Error for Php 7+

Expected results

Actual results