symfony/symfony — pull request #12975 by jakzal (2014-12-13 20:17:55+00:00)
Title: [FrameworkBundle] Allow custom services for validator mapping cache.

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12803
| License | MIT
| Doc PR | -

#9892 introduced `DoctrineCache`, but it's not really used by the FrameworkBundle. This was overlooked, therefore I think it should go into 2.5.

This PR will let us to configure a service id, instead of a driver name. The only exception is apc, which is converted to `validator.mapping.cache.apc` to keep BC.

Examples:

```yaml
framework:
validation:
cache: apc # converted to validator.mapping.cache.apc
```

```yaml
framework:
validation:
cache: my_custom_cache_service
```

It would be nice to be able to provide a doctrine service id, instead of `CacheInterface` implementation. It could be automatically decorated with `DoctrineCache`. I'll work on it next.