Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
DependencyInjection: added missing use $container#37665
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedJul 29, 2020
As highlighted in the failing test case, there are situations where the |
ghost commentedJul 29, 2020
Hi Nicolas, Of course. Here you can will find an example project. https://github.com/DarkyMuc/symfony_di_example After you call this project via browser, you receive the error "Notice: Undefined variable: container" I think it's the combination of shared: false and lazy: true in the service.yaml. Greetings Markus |
nicolas-grekas commentedAug 26, 2020
Thanks for all the details, fixed in#37953 |
This PR was merged into the 5.1 branch.Discussion----------[DI] fix dumping lazy non-shared services| Q | A| ------------- | ---| Branch? | 5.1| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#37665| License | MIT| Doc PR | -Commits-------a4f4ca7 [DI] fix dumping lazy non-shared services
Uh oh!
There was an error while loading.Please reload this page.
If you use not shared services, $container was not shared in closure. Error-Message: Notice: Undefined variable: $container