Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Cache] Memcached $defaultClientOptions override passed serializer #33717

Copy link
Copy link
Closed
@duronrulez

Description

@duronrulez
Issue body actions

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,
    ];

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.