[FrameworkBundle] deprecated validator.mapping.cache.doctrine.apc

This commit is contained in:
Fabien Potencier 2017-06-10 17:54:55 -07:00
parent 7c1febd600
commit b57895ccaf
4 changed files with 17 additions and 1 deletions

View File

@ -16,6 +16,8 @@ Finder
FrameworkBundle
---------------
* The `validator.mapping.cache.doctrine.apc` service has been deprecated.
* Using the `KERNEL_DIR` environment variable or the automatic guessing based
on the `phpunit.xml` / `phpunit.xml.dist` file location is deprecated since 3.4.
Set the `KERNEL_CLASS` environment variable to the fully-qualified class name

View File

@ -227,6 +227,8 @@ Form
FrameworkBundle
---------------
* The `validator.mapping.cache.doctrine.apc` service has been removed.
* The `cache:clear` command does not warmup the cache anymore. Warmup should
be done via the `cache:warmup` command.

View File

@ -661,7 +661,18 @@ class Configuration implements ConfigurationInterface
->info('validation configuration')
->{!class_exists(FullStack::class) && class_exists(Validation::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->children()
->scalarNode('cache')->end()
->scalarNode('cache')
->beforeNormalization()
// Can be removed in 4.0, when validator.mapping.cache.apc is removed
->ifString()->then(function ($v) {
if ('validator.mapping.cache.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
throw new LogicException('Doctrine APC cache for the validator cannot be enabled as the Doctrine Cache package is not installed.');
}
return $v;
})
->end()
->end()
->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
->arrayNode('static_method')
->defaultValue(array('loadValidatorMetadata'))

View File

@ -57,6 +57,7 @@
</call>
</service>
</argument>
<deprecated>The "%service_id%" service is deprecated since Symfony 3.4 and will be removed in 4.0. Use a Psr6 cache like "validator.mapping.cache.symfony" instead.</deprecated>
</service>
<service id="validator.validator_factory" class="Symfony\Component\Validator\ContainerConstraintValidatorFactory">