Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0604250

Browse files
committed
Remove MimeMessageNormalizer if the Mime component is not installed
1 parent 98802e5 commit 0604250

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,10 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
15051505
$container->removeDefinition('serializer.denormalizer.unwrapping');
15061506
}
15071507

1508+
if (!class_exists(Headers::class)) {
1509+
$container->removeDefinition('serializer.normalizer.mime_message');
1510+
}
1511+
15081512
$serializerLoaders = [];
15091513
if (isset($config['enable_annotations']) && $config['enable_annotations']) {
15101514
if (!$this->annotationsConfigEnabled) {

0 commit comments

Comments
 (0)