Skip to content

Navigation Menu

Sign in
Appearance settings

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 13a7df0

Browse filesBrowse files
committed
[FrameworkBundle] Register the CSV encoder
1 parent 8493a20 commit 13a7df0
Copy full SHA for 13a7df0

File tree

1 file changed

+8
-0
lines changed
Filter options

1 file changed

+8
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
2727
use Symfony\Component\Config\FileLocator;
2828
use Symfony\Component\PropertyAccess\PropertyAccessor;
29+
use Symfony\Component\Serializer\Encoder\CsvEncoder;
2930
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
3031
use Symfony\Component\Serializer\Normalizer\DataUriNormalizer;
3132
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
@@ -977,6 +978,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
977978
$definition->addTag('serializer.normalizer', array('priority' => -900));
978979
}
979980

981+
if (class_exists(CsvEncoder::class)) {
982+
// Run before serializer.normalizer.object
983+
$definition = $container->register('serializer.encoder.csv', CsvEncoder::class);
984+
$definition->setPublic(false);
985+
$definition->addTag('serializer.encoder');
986+
}
987+
980988
$loader->load('serializer.xml');
981989
$chainLoader = $container->getDefinition('serializer.mapping.chain_loader');
982990

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.