diff --git a/UPGRADE-2.8.md b/UPGRADE-2.8.md
index 7acc2baa34..227e7cc9f7 100644
--- a/UPGRADE-2.8.md
+++ b/UPGRADE-2.8.md
@@ -506,6 +506,28 @@ FrameworkBundle
cookie_httponly: false
```
+ * The `validator.mapping.cache.apc` service is deprecated, and will be removed in 3.0.
+ Use `validator.mapping.cache.doctrine.apc` instead.
+
+ * The ability to pass `apc` as the `framework.validation.cache` configuration key value is deprecated,
+ and will be removed in 3.0. Use `validator.mapping.cache.doctrine.apc` instead:
+
+ Before:
+
+ ```yaml
+ framework:
+ validation:
+ cache: apc
+ ```
+
+ After:
+
+ ```yaml
+ framework:
+ validation:
+ cache: validator.mapping.cache.doctrine.apc
+ ```
+
Security
--------
diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md
index e5c504ae53..f52ebd6eb4 100644
--- a/UPGRADE-3.0.md
+++ b/UPGRADE-3.0.md
@@ -744,6 +744,27 @@ UPGRADE FROM 2.x to 3.0
interface.
The `security.csrf.token_manager` should be used instead.
+ * The `validator.mapping.cache.apc` service has been removed in favor of the `validator.mapping.cache.doctrine.apc` one.
+
+ * The ability to pass `apc` as the `framework.validation.cache` configuration key value has been removed.
+ Use `validator.mapping.cache.doctrine.apc` instead:
+
+ Before:
+
+ ```yaml
+ framework:
+ validation:
+ cache: apc
+ ```
+
+ After:
+
+ ```yaml
+ framework:
+ validation:
+ cache: validator.mapping.cache.doctrine.apc
+ ```
+
### HttpKernel
* The `Symfony\Component\HttpKernel\Log\LoggerInterface` has been removed in
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
index 309cc6c48c..b351039da9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
@@ -645,7 +645,15 @@ class Configuration implements ConfigurationInterface
->scalarNode('cache')
->beforeNormalization()
// Can be removed in 3.0, once ApcCache support is dropped
- ->ifString()->then(function ($v) { return 'apc' === $v ? 'validator.mapping.cache.apc' : $v; })
+ ->ifString()->then(function ($v) {
+ if ('apc' === $v) {
+ @trigger_error('The ability to pass "apc" as the framework.validation.cache configuration key value is deprecated since version 2.8 and will be removed in 3.0. Use the "validator.mapping.cache.doctrine.apc" service id instead.', E_USER_DEPRECATED);
+
+ return 'validator.mapping.cache.apc';
+ }
+
+ return $v;
+ })
->end()
->end()
->booleanNode('enable_annotations')->defaultFalse()->end()
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
index de8709ffd1..a18099f973 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
@@ -37,6 +37,7 @@
%validator.mapping.cache.prefix%
+ The "%service_id%" service is deprecated since Symfony 2.5 and will be removed in 3.0.
@@ -47,7 +48,6 @@
- The "%service_id%" service is deprecated since Symfony 2.8 and will be removed in 3.0.
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php
index 7c135dfc35..b3e32a5eb5 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php
@@ -55,7 +55,7 @@ $container->loadFromExtension('framework', array(
),
'validation' => array(
'enabled' => true,
- 'cache' => 'apc',
+ 'cache' => 'validator.mapping.cache.doctrine.apc',
),
'annotations' => array(
'cache' => 'file',
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
index b94f44762f..c0ebb67ea1 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
@@ -37,7 +37,7 @@
%kernel.root_dir%/Fixtures/translations
-
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
index 13ceca12a4..b2693d7e02 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
@@ -43,7 +43,7 @@ framework:
paths: ['%kernel.root_dir%/Fixtures/translations']
validation:
enabled: true
- cache: apc
+ cache: validator.mapping.cache.doctrine.apc
annotations:
cache: file
debug: true
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index abb3b04f68..5db49224bc 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -295,7 +295,7 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertSame('addMethodMapping', $calls[4][0]);
$this->assertSame(array('loadValidatorMetadata'), $calls[4][1]);
$this->assertSame('setMetadataCache', $calls[5][0]);
- $this->assertEquals(array(new Reference('validator.mapping.cache.apc')), $calls[5][1]);
+ $this->assertEquals(array(new Reference('validator.mapping.cache.doctrine.apc')), $calls[5][1]);
}
/**