Skip to content

Commit

Permalink
change loader to injector
Browse files Browse the repository at this point in the history
  • Loading branch information
eltharin committed Jul 8, 2024
1 parent 9bc13c8 commit a9ac7a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<argument type="service" id="doctrine" />
</service>

<service id="doctrine.orm.entity_value_resolver_variables_loader" class="Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolverVariablesLoader">
<service id="doctrine.orm.entity_value_resolver_variables_injector" class="Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolverVariablesInjector">
<argument type="service" id="security.token_storage" on-invalid="ignore" />
</service>

Expand Down
6 changes: 3 additions & 3 deletions src/DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use InvalidArgumentException;
use LogicException;
use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver;
use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolverVariableLoader;
use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolverVariableInjector;
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
use Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension;
use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator;
Expand Down Expand Up @@ -538,8 +538,8 @@ protected function ormLoad(array $config, ContainerBuilder $container)
$container->getDefinition('doctrine.orm.entity_value_resolver')->setArgument(2, (new Definition(MapEntity::class)));
}

if (class_exists(ExpressionLanguage::class) && class_exists(EntityValueResolverVariableLoader::class)) {
$container->getDefinition('doctrine.orm.entity_value_resolver')->setArgument(3, new Reference('doctrine.orm.entity_value_resolver_variables_loader'));
if (class_exists(ExpressionLanguage::class) && class_exists(EntityValueResolverVariableInjector::class)) {
$container->getDefinition('doctrine.orm.entity_value_resolver')->setArgument(3, new Reference('doctrine.orm.entity_value_resolver_variables_injector'));
}
}

Expand Down

0 comments on commit a9ac7a8

Please sign in to comment.