-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service definition changes for EntityValueResolver #1812
Conversation
a9ac7a8
to
b3b0dd3
Compare
Service Definition change for allow user inject its own variables in EntityValueResolver Symfony review change : EntityValueResolverVariableInjector to UserInjector
b3b0dd3
to
0a71f6e
Compare
@@ -533,6 +534,12 @@ protected function ormLoad(array $config, ContainerBuilder $container) | |||
$controllerResolverDefaults['evict_cache'] ?? null, | |||
$controllerResolverDefaults['disabled'] ?? false, | |||
])); | |||
} else { | |||
$container->getDefinition('doctrine.orm.entity_value_resolver')->setArgument(2, (new Definition(MapEntity::class))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not I can't set my new argument, I have this error :
``
In DefinitionErrorExceptionPass.php line 48:
Invalid constructor argument 4 for service "doctrine.orm.entity_value_resolver": argument 3 must be defined before. Check your service definition.
``
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can just remove the if to have only one initialisation.
789183f
to
96e5b2d
Compare
correct psalm
96e5b2d
to
b856ad0
Compare
Closing as the PR on Symfony side was also closed. See symfony/symfony#57676 (comment) |
Hello, what would be the solution to solve this problem? |
This PR is related symfony/symfony#57676 for add a variableLoader service to inject in EntityValueResolver to allow user to have it's own variables (eg: user) in mapEntity