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 2a9edfa

Browse filesBrowse files
committed
bug #37058 [FrameworkBundle] Extension Serializer issue (Korbeil)
This PR was merged into the 5.1 branch. Discussion ---------- [FrameworkBundle] Extension Serializer issue | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | ??? | License | MIT | Doc PR | Hi, When creating a new Symfony project and requiring `symfony/serializer` we have an issue with required service. Here is a simple reproducer: ![image](https://user-images.githubusercontent.com/944409/83497176-6266d480-a4ba-11ea-98cb-7e354be0a273.png) This bug was introduced by #31390 Commits ------- ab5628f FrameworkBundle Serializer issue
2 parents 706ff58 + ab5628f commit 2a9edfa
Copy full SHA for 2a9edfa

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
13791379

13801380
private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
13811381
{
1382-
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
1382+
if (!class_exists(PropertyAccessor::class)) {
13831383
return;
13841384
}
13851385

@@ -1463,7 +1463,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
14631463

14641464
$chainLoader = $container->getDefinition('serializer.mapping.chain_loader');
14651465

1466-
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
1466+
if (!class_exists(PropertyAccessor::class)) {
14671467
$container->removeAlias('serializer.property_accessor');
14681468
$container->removeDefinition('serializer.normalizer.object');
14691469
}
@@ -1472,7 +1472,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
14721472
$container->removeDefinition('serializer.encoder.yaml');
14731473
}
14741474

1475-
if (!class_exists(UnwrappingDenormalizer::class)) {
1475+
if (!class_exists(UnwrappingDenormalizer::class) || !class_exists(PropertyAccessor::class)) {
14761476
$container->removeDefinition('serializer.denormalizer.unwrapping');
14771477
}
14781478

0 commit comments

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