|
84 | 84 | use Symfony\Component\PropertyAccess\PropertyAccessor;
|
85 | 85 | use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
|
86 | 86 | use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
|
87 |
| -use Symfony\Component\PropertyInfo\PropertyInfoCacheExtractor; |
88 | 87 | use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
|
89 | 88 | use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface;
|
90 | 89 | use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
|
|
100 | 99 | use Symfony\Component\Serializer\Encoder\DecoderInterface;
|
101 | 100 | use Symfony\Component\Serializer\Encoder\EncoderInterface;
|
102 | 101 | use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata;
|
103 |
| -use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; |
104 | 102 | use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer;
|
105 | 103 | use Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer;
|
106 | 104 | use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
@@ -1506,18 +1504,8 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
|
1506 | 1504 | $chainLoader->replaceArgument(0, $serializerLoaders);
|
1507 | 1505 | $container->getDefinition('serializer.mapping.cache_warmer')->replaceArgument(0, $serializerLoaders);
|
1508 | 1506 |
|
1509 |
| - if (!$container->getParameter('kernel.debug')) { |
1510 |
| - $cacheMetadataFactory = new Definition( |
1511 |
| - CacheClassMetadataFactory::class, |
1512 |
| - [ |
1513 |
| - new Reference('serializer.mapping.cache_class_metadata_factory.inner'), |
1514 |
| - new Reference('serializer.mapping.cache.symfony'), |
1515 |
| - ] |
1516 |
| - ); |
1517 |
| - $cacheMetadataFactory->setPublic(false); |
1518 |
| - $cacheMetadataFactory->setDecoratedService('serializer.mapping.class_metadata_factory'); |
1519 |
| - |
1520 |
| - $container->setDefinition('serializer.mapping.cache_class_metadata_factory', $cacheMetadataFactory); |
| 1507 | + if ($container->getParameter('kernel.debug')) { |
| 1508 | + $container->removeDefinition('serializer.mapping.cache_class_metadata_factory'); |
1521 | 1509 | }
|
1522 | 1510 |
|
1523 | 1511 | if (isset($config['name_converter']) && $config['name_converter']) {
|
@@ -1553,18 +1541,8 @@ private function registerPropertyInfoConfiguration(ContainerBuilder $container,
|
1553 | 1541 | $definition->addTag('property_info.type_extractor', ['priority' => -1001]);
|
1554 | 1542 | }
|
1555 | 1543 |
|
1556 |
| - if (!$container->getParameter('kernel.debug')) { |
1557 |
| - $propertyInfoCache = new Definition( |
1558 |
| - PropertyInfoCacheExtractor::class, |
1559 |
| - [ |
1560 |
| - new Reference('property_info.cache.inner'), |
1561 |
| - new Reference('cache.property_info'), |
1562 |
| - ] |
1563 |
| - ); |
1564 |
| - $propertyInfoCache->setPublic(false); |
1565 |
| - $propertyInfoCache->setDecoratedService('property_info'); |
1566 |
| - |
1567 |
| - $container->setDefinition('property_info.cache', $propertyInfoCache); |
| 1544 | + if ($container->getParameter('kernel.debug')) { |
| 1545 | + $container->removeDefinition('property_info.cache'); |
1568 | 1546 | }
|
1569 | 1547 | }
|
1570 | 1548 |
|
|
0 commit comments