Skip to content

Commit

Permalink
Merge pull request #965 from dunglas/31486_wiring
Browse files Browse the repository at this point in the history
Wiring of the new PropertyAccessExtractor
  • Loading branch information
alcaeus committed May 13, 2019
2 parents 51f8a11 + ed05135 commit f2a47c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DependencyInjection/DoctrineExtension.php
Expand Up @@ -25,6 +25,7 @@
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransportFactory;
use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
use Symfony\Component\Validator\Mapping\Loader\LoaderInterface;
use function class_exists;
Expand Down Expand Up @@ -794,6 +795,12 @@ private function loadPropertyInfoExtractor($entityManagerName, ContainerBuilder

$propertyExtractorDefinition->addTag('property_info.list_extractor', ['priority' => -1001]);
$propertyExtractorDefinition->addTag('property_info.type_extractor', ['priority' => -999]);

if (! is_a(DoctrineExtractor::class, PropertyAccessExtractorInterface::class, true)) {
return;
}

$propertyExtractorDefinition->addTag('property_info.access_extractor', ['priority' => -999]);
}

/**
Expand Down

0 comments on commit f2a47c0

Please sign in to comment.