Closed
Description
Symfony version(s) affected: 3.4.* (but pretty sure all version have it)
Description
When you want to change the serializer option for memcached, it gets overriden by the default options.
How to reproduce
MemcachedAdapter::createConnection($serversDsn, [\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_IGBINARY]);
// this creates the connections with the default serializer PHP from the MemcachedTrait $defaultClientOptions
Possible Solution
instead of using this:
private static $defaultClientOptions = [
'persistent_id' => null,
'username' => null,
'password' => null,
'serializer' => 'php',
];
use this:
private static $defaultClientOptions = [
'persistent_id' => null,
'username' => null,
'password' => null,
\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP,
];