8000 [Validator] Remove pre 3.0 ApcCache leftovers · symfony/symfony@911cb24 · GitHub
[go: up one dir, main page]

Skip to content

Commit 911cb24

Browse files
committed
[Validator] Remove pre 3.0 ApcCache leftovers
Remove some lefover references to Symfony\Component\Validator\Mapping\Cache\ApcCache. This class was removed in commit 2a6b629.
1 parent a16c752 commit 911cb24

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
436436
->info('validation configuration')
437437
->canBeEnabled()
438438
->children()
439-
->scalarNode('cache')
440-
->beforeNormalization()
441-
// Can be removed in 3.0, once ApcCache support is dropped
442-
->ifString()->then(function ($v) { return 'apc' === $v ? 'validator.mapping.cache.apc' : $v; })
443-
->end()
444-
->end()
439+
->scalarNode('cache')->end()
445440
->booleanNode('enable_annotations')->defaultFalse()->end()
446441
->arrayNode('static_method')
447442
->defaultValue(array('loadValidatorMetadata'))

src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828

2929
<service id="validator.mapping.class_metadata_factory" alias="validator" public="false" />
3030

31-
<service id="validator.mapping.cache.apc" class="Symfony\Component\Validator\Mapping\Cache\ApcCache" public="false">
32-
<argument>%validator.mapping.cache.prefix%</argument>
33-
</service>
34-
3531
<service id="validator.validator_factory" class="Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory" public="false">
3632
<argument type="service" id="service_container" />
3733
<argument type="collection" />

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<framework:translator enabled="true" fallback="fr" logging="true">
3939
<framework:path>%kernel.root_dir%/Fixtures/translations</framework:path>
4040
</framework:translator>
41-
<framework:validation enabled="true" cache="apc" />
41+
<framework:validation enabled="true" cache="validator.mapping.cache.doctrine.apc" />
4242
<framework:annotations cache="file" debug="true" file-cache-dir="%kernel.cache_dir%/annotations" />
4343
<framework:serializer enabled="true" enable-annotations="true" cache="serializer.mapping.cache.apc" name-converter="serializer.name_converter.camel_case_to_snake_case" />
4444
</framework:config>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public function testValidation()
298298
$this->assertSame('addMethodMapping', $calls[4][0]);
299299
$this->assertSame(array('loadValidatorMetadata'), $calls[4][1]);
300300
$this->assertSame('setMetadataCache', $calls[5][0]);
301-
$this->assertEquals(array(new Reference('validator.mapping.cache.apc')), $calls[5][1]);
301+
$this->assertEquals(array(new Reference('validator.mapping.cache.doctrine.apc')), $calls[5][1]);
302302
}
303303

304304
public function testValidationService()

0 commit comments

Comments
 (0)
0