snc/SncRedisBundle — pull request #165 by nzwalker (2014-12-03 22:53:37+00:00)
Title: Fix multiple connections with same alias overwriting other connections parameters

This PR fixes a bug where multiple DSNs/connections with the same alias will have their connection parameters overwritten. This is due to the alias being used as a unique key (e.g ```snc_redis.connection.master_parameters```) which is used when building the container definitions for the various client services. This is especially problematic when using master/slave, since Predis relies on "master" being the connection alias.

The fix is to also use the client name to build a unique key for the connection parameters. People might be relying on this bug (either through using the parameters in the container directly, or not realising the connection parameters are being shared), so could be a BC break. Keen to get feedback whether this solution is reasonable.

This fixes issue https://github.com/snc/SncRedisBundle/issues/159

Example problematic configuration below, which exhibits the "cache" client using the wrong prefix option.

````
snc_redis:
clients:
session:
type: predis
alias: session
dsn:
- redis://127.0.0.1:6379/0?alias=master
- redis://127.0.0.1:6380/0
logging: %kernel.debug%
options:
replication: true
prefix: 'session'
cache:
type: predis
alias: cache
dsn:
- redis://127.0.0.1:6379/1?alias=master
- redis://127.0.0.1:6380/1
options:
replication: true
prefix: 'cache'
```