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

Skip to content

Commit 22d5d95

Browse files
committed
Fix @aitboudad comments.
1 parent 8857d3e commit 22d5d95

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\DependencyInjection\Reference;
1717

1818
/**
19-
* Adds extractors to the property_info_extractor service.
19+
* Adds extractors to the property_info service.
2020
*
2121
* @author Kévin Dunglas <[email protected]>
2222
*/
@@ -27,21 +27,21 @@ class PropertyInfoPass implements CompilerPassInterface
2727
*/
2828
public function process(ContainerBuilder $container)
2929
{
30-
if (!$container->hasDefinition('property_info_extractor')) {
30+
if (!$container->hasDefinition('property_info')) {
3131
return;
3232
}
3333

34-
$listExtractors = $this->findAndSortTaggedServices('property_info', $container);
35-
$container->getDefinition('property_info_extractor')->replaceArgument(0, $listExtractors);
34+
$listExtractors = $this->findAndSortTaggedServices('property_info.list_extractor', $container);
35+
$container->getDefinition('property_info')->replaceArgument(0, $listExtractors);
3636

37-
$typeExtractors = $this->findAndSortTaggedServices('property_info', $container);
38-
$container->getDefinition('property_info.type_extractor')->replaceArgument(1, $typeExtractors);
37+
$typeExtractors = $this->findAndSortTaggedServices('property_info.type_extractor', $container);
38+
$container->getDefinition('property_info')->replaceArgument(1, $typeExtractors);
3939

40-
$descriptionExtractors = $this->findAndSortTaggedServices('property_info', $container);
41-
$container->getDefinition('property_info.description_extractor')->replaceArgument(2, $descriptionExtractors);
40+
$descriptionExtractors = $this->findAndSortTaggedServices('property_info.description_extractor', $container);
41+
$container->getDefinition('property_info')->replaceArgument(2, $descriptionExtractors);
4242

43-
$accessExtractors = $this->findAndSortTaggedServices('property_info', $container);
44-
$container->getDefinition('property_info.access_extractor')->replaceArgument(3, $accessExtractors);
43+
$accessExtractors = $this->findAndSortTaggedServices('property_info.access_extractor', $container);
44+
$container->getDefinition('property_info')->replaceArgument(3, $accessExtractors);
4545
}
4646

4747
/**

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddValidatorInitializersPass;
1616
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
1717
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass;
18+
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass;
1819
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingPass;
1920
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RoutingResolverPass;
2021
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
@@ -89,6 +90,7 @@ public function build(ContainerBuilder $container)
8990
$container->addCompilerPass(new TranslationDumperPass());
9091
$container->addCompilerPass(new FragmentRendererPass(), PassConfig::TYPE_AFTER_REMOVING);
9192
$container->addCompilerPass(new SerializerPass());
93+
$container->addCompilerPass(new PropertyInfoPass());
9294

9395
if ($container->getParameter('kernel.debug')) {
9496
$container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING);

src/Symfony/Bundle/FrameworkBundle/Resources/config/property_info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</service>
1414

1515
<!-- Extractor -->
16-
<service id="property_info.reflection_extractor" public="false">
16+
<service id="property_info.reflection_extractor" class="Symfony\Component\PropertyInfo\ReflectionExtractor" public="false">
1717
<tag name="property_info.list_extractor" priority="-1000" />
1818
<tag name="property_info.type_extractor" priority="-1000" />
1919
<tag name="property_info.access_extractor" priority="-1000" />

0 commit comments

Comments
 (0)