1up-lab / OneupFlysystemBundle

A Flysystem integration for your Symfony projects.
MIT License
630 stars 118 forks source link

Invalid service "cache.memcached": method "League\Flysystem\Cached\Storage\Memcached::addServer()" does not exist. #227

Closed On5-Repos closed 3 years ago

On5-Repos commented 3 years ago

As per documentation after installing composer require league/flysystem-cached-adapter

Register the service

services:
    cache.memcached:
        class: Memcached
        calls:
            - [ addServer, [ "memcached.domain.com", 11211 ]]

but after creating the service I get error on load.

`Invalid service "cache.memcached": method "League\Flysystem\Cached\Storage\Memcached::addServer()" does not exist.`

That's now I register service

services:
    cache.memcached:
        class: League\Flysystem\Cached\Storage\Memcached
        calls:
            - [ addServer, [ "127.0.0.1", 11211 ]]
bytehead commented 3 years ago
services:
    cache.memcached:
        class: League\Flysystem\Cached\Storage\Memcached
        calls:
            - [ addServer, [ "127.0.0.1", 11211 ]]

Thats wrong, you should use class Memcached, see https://www.php.net/manual/de/book.memcached.php.