| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\PropertyInfo\DependencyInjection; |
| 13 |
|
| 14 |
use Symfony\Component\DependencyInjection\Argument\IteratorArgument; |
| 15 |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
| 16 |
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; |
| 17 |
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
final class PropertyInfoConstructorPass implements CompilerPassInterface |
| 25 |
{ |
| 26 |
use PriorityTaggedServiceTrait; |
| 27 |
|
| 28 |
public function process(ContainerBuilder $container): void |
| 29 |
{ |
| 30 |
if (!$container->hasDefinition('property_info.constructor_extractor')) { |
| 31 |
return; |
| 32 |
} |
| 33 |
$definition = $container->getDefinition('property_info.constructor_extractor'); |
| 34 |
|
| 35 |
$listExtractors = $this->findAndSortTaggedServices('property_info.constructor_extractor', $container); |
| 36 |
$definition->replaceArgument(0, new IteratorArgument($listExtractors)); |
| 37 |
} |
| 38 |
} |