8000 [FrameworkBundle] Deprecate "framework.serializer.cache" · symfony/symfony@e363223 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e363223

Browse files
author
Ener-Getick
committed
[FrameworkBundle] Deprecate "framework.serializer.cache"
1 parent db208e3 commit e363223

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode)
513513
->canBeEnabled()
514514
->children()
515515
->booleanNode('enable_annotations')->defaultFalse()->end()
516-
->scalarNode('cache')->defaultValue('serializer.mapping.cache.symfony')->end()
516+
->scalarNode('cache')->end()
517517
->scalarNode('name_converter')->end()
518518
->end()
519519
->end()

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,9 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
982982

983983
$chainLoader->replaceArgument(0, $serializerLoaders);
984984

985-
if (!$container->getParameter('kernel.debug')) {
985+
if (isset($config['cache']) && $config['cache']) {
986+
@trigger_error('Using the option "framework.serializer.cache" is deprecated since version 3.1. This option will be removed in 4.0. You can configure a cache pool called "serializer" under "framework.cache" instead.', E_USER_DEPRECATED);
987+
986988
$container->setParameter(
987989
'serializer.mapping.cache.prefix',
988990
'serializer_'.$this->getKernelRootHash($container)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ protected static function getBundleDefaultConfig()
221221
'serializer' => array(
222222
'enabled' => false,
223223
'enable_annotations' => false,
224-
'cache' => 'serializer.mapping.cache.symfony',
225224
),
226225
'property_access' => array(
227226
'magic_call' => false,

src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(LoaderInterface $loader, Cache $cache = null)
5050
$this->cache = $cache;
5151

5252
if (null !== $cache) {
53-
@trigger_error(sprintf('Passing a Doctrine Cache instance as 2nd parameter of the "%s" constructor is deprecated. This parameter will be removed in Symfony 4.0. Use t 4F41 he "%s" class instead.', __CLASS__, CacheClassMetadataFactory::class), E_USER_DEPRECATED);
53+
@trigger_error(sprintf('Passing a Doctrine Cache instance as 2nd parameter of the "%s" constructor is deprecated since version 3.1. This parameter will be removed in Symfony 4.0. Use the "%s" class instead.', __CLASS__, CacheClassMetadataFactory::class), E_USER_DEPRECATED);
5454
}
5555
}
5656

0 commit comments

Comments
 (0)
0