Skip to content

Commit

Permalink
Merge pull request #917 from greg0ire/detect-proper-component
Browse files Browse the repository at this point in the history
Detect doctrine bridge version
  • Loading branch information
alcaeus committed Feb 5, 2019
2 parents dc8feee + 98ab626 commit 19f85ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DependencyInjection/DoctrineExtension.php
Expand Up @@ -25,7 +25,6 @@
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface;

/**
* DoctrineExtension is an extension for the Doctrine DBAL and ORM library.
Expand Down Expand Up @@ -800,7 +799,7 @@ protected function loadOrmCacheDrivers(array $entityManager, ContainerBuilder $c
private function loadPropertyInfoExtractor($entityManagerName, ContainerBuilder $container)
{
$propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), DoctrineExtractor::class);
if (interface_exists(PropertyInitializableExtractorInterface::class)) {
if (property_exists(DoctrineExtractor::class, 'entityManager')) {
$argumentId = sprintf('doctrine.orm.%s_entity_manager', $entityManagerName);
} else {
$argumentId = sprintf('doctrine.orm.%s_entity_manager.metadata_factory', $entityManagerName);
Expand Down

0 comments on commit 19f85ec

Please sign in to comment.