From 96e418a14fd8dc83d5b8bfa0e5a6181544b49666 Mon Sep 17 00:00:00 2001 From: Ener-Getick Date: Mon, 25 Apr 2016 18:39:01 +0200 Subject: [PATCH] Revert "[FrameworkBundle] Fallback to default cache system in production for serializer" This reverts commit 4f0b8beea6bbbe9c60fa8189e0e7b9443bcc8ea7. --- .../FrameworkBundle/DependencyInjection/Configuration.php | 2 +- .../DependencyInjection/FrameworkExtension.php | 2 +- .../Bundle/FrameworkBundle/Resources/config/cache_pools.xml | 4 ---- .../Bundle/FrameworkBundle/Resources/config/serializer.xml | 4 ---- .../Tests/DependencyInjection/ConfigurationTest.php | 1 - 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 406ed376b4..7d8bf5f0a0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -513,7 +513,7 @@ class Configuration implements ConfigurationInterface ->canBeEnabled() ->children() ->booleanNode('enable_annotations')->defaultFalse()->end() - ->scalarNode('cache')->defaultValue('serializer.mapping.cache.symfony')->end() + ->scalarNode('cache')->end() ->scalarNode('name_converter')->end() ->end() ->end() diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index bc12894339..16e8fce463 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -982,7 +982,7 @@ class FrameworkExtension extends Extension $chainLoader->replaceArgument(0, $serializerLoaders); - if (!$container->getParameter('kernel.debug')) { + if (isset($config['cache']) && $config['cache']) { $container->setParameter( 'serializer.mapping.cache.prefix', 'serializer_'.$this->getKernelRootHash($container) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml index b79d9c0d39..7a567896a0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml @@ -25,10 +25,6 @@ - - - - diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml index 68db50f927..d5b5093fb6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml @@ -38,10 +38,6 @@ - - - - %serializer.mapping.cache.prefix% diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 9ecc2df51d..b41d568c64 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -221,7 +221,6 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase 'serializer' => array( 'enabled' => false, 'enable_annotations' => false, - 'cache' => 'serializer.mapping.cache.symfony', ), 'property_access' => array( 'magic_call' => false,