You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a ScopeWideningInjectionException (with the big message about using scope:request or strict=false in rare cases) when injecting a synchronized request into my service in YAML with the following code :
Here there's a strict="false". So I've tried the following in YAML :
calls:
- [setRequest, ['@?request=']]
And now it works fine, no more exception.
But the fact that the unit tests are working and my code does not confuse me. So I'm wondering if there's a bug in the DI component about strict + synchronized in YAML parsing.
What do you think ? Should I also open a PR on the documentation for the missing = ?
The text was updated successfully, but these errors were encountered:
I'm having a ScopeWideningInjectionException (with the big message about using scope:request or strict=false in rare cases) when injecting a synchronized request into my service in YAML with the following code :
The same syntax is also used in the framework unit tests :
Which is also the same as described in the documentation for YAML : http://symfony.com/doc/current/cookbook/service_container/scopes.html#using-a-synchronized-service
But if I look at the XML example in the documentation, I see something different :
Here there's a
strict="false"
. So I've tried the following in YAML :And now it works fine, no more exception.
But the fact that the unit tests are working and my code does not confuse me. So I'm wondering if there's a bug in the DI component about strict + synchronized in YAML parsing.
What do you think ? Should I also open a PR on the documentation for the missing
=
?The text was updated successfully, but these errors were encountered: