diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php
index 819827ac8c..f2a92021e9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php
@@ -31,17 +31,19 @@ class PropertyInfoPass implements CompilerPassInterface
return;
}
+ $definition = $container->getDefinition('property_info');
+
$listExtractors = $this->findAndSortTaggedServices('property_info.list_extractor', $container);
- $container->getDefinition('property_info')->replaceArgument(0, $listExtractors);
+ $definition->replaceArgument(0, $listExtractors);
$typeExtractors = $this->findAndSortTaggedServices('property_info.type_extractor', $container);
- $container->getDefinition('property_info')->replaceArgument(1, $typeExtractors);
+ $definition->replaceArgument(1, $typeExtractors);
$descriptionExtractors = $this->findAndSortTaggedServices('property_info.description_extractor', $container);
- $container->getDefinition('property_info')->replaceArgument(2, $descriptionExtractors);
+ $definition->replaceArgument(2, $descriptionExtractors);
$accessExtractors = $this->findAndSortTaggedServices('property_info.access_extractor', $container);
- $container->getDefinition('property_info')->replaceArgument(3, $accessExtractors);
+ $definition->replaceArgument(3, $accessExtractors);
}
/**
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
index d514a3666f..752588c37e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
@@ -55,5 +55,12 @@
+
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php
index 74f0b607bd..fca0f3461f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php
@@ -32,7 +32,8 @@ class PropertyInfoPassTest extends \PHPUnit_Framework_TestCase
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder', array('findTaggedServiceIds'));
- $container->expects($this->any())
+ $container
+ ->expects($this->any())
->method('findTaggedServiceIds')
->will($this->returnValue($services));
@@ -53,9 +54,11 @@ class PropertyInfoPassTest extends \PHPUnit_Framework_TestCase
{
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder', array('findTaggedServiceIds'));
- $container->expects($this->any())
+ $container
+ ->expects($this->any())
->method('findTaggedServiceIds')
- ->will($this->returnValue(array()));
+ ->will($this->returnValue(array()))
+ ;
$propertyInfoPass = new PropertyInfoPass();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index 34889a13a1..010b62ad7a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -441,6 +441,18 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertEquals(new Reference('serializer.name_converter.camel_case_to_snake_case'), $container->getDefinition('serializer.normalizer.object')->getArgument(1));
}
+ public function testRegisterSerializerExtractor()
+ {
+ $container = $this->createContainerFromFile('full');
+
+ $serializerExtractorDefinition = $container->getDefinition('property_info.serializer_extractor');
+
+ $this->assertEquals('serializer.mapping.class_metadata_factory', $serializerExtractorDefinition->getArgument(0)->__toString());
+ $this->assertFalse($serializerExtractorDefinition->isPublic());
+ $tag = $serializerExtractorDefinition->getTag('property_info.list_extractor');
+ $this->assertEquals(array('priority' => -999), $tag[0]);
+ }
+
public function testAssetHelperWhenAssetsAreEnabled()
{
$container = $this->createContainerFromFile('full');