Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[DependencyInjection] Fix cloned lazy services not sharing their dependencies when dumped with PhpDumper#59723
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
[DependencyInjection] Fix cloned lazy services not sharing their dependencies when dumped with PhpDumper#59723
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
cba91d9
to9ea5995
CompareUpdated. I don't think the failing tests are related. |
src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...ymfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
LGTM thanks, just some CS tweaks needed.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/DependencyContainerInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/DependencyContainerInterface.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/DependencyContainer.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/DependencyContainer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/DependencyContainer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/DependencyContainer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
9ea5995
toc93c0d5
CompareResolved style comments |
Note that when using native proxies, cloning will trigger initialization. (The patch is still fixing a valid concern since we're not coupled to one implementation) |
…ndencies when dumped with PhpDumper
c93c0d5
toa60cff5
CompareThank you@pvandommelen. |
0247b1b
intosymfony:6.4Uh oh!
There was an error while loading.Please reload this page.
Thanks for the quick reviews! |
Fixes referenced services not being shared when lazy services are cloned before being initialized. Adds tests for both the ghost and proxy scenario's.
This makes the inlining behaviour more conservative, which impacts the outputs of some other test cases.
First commit adds a test, second commit has the fix. Third commit also considers the proxy case, which is also affected. I can squash if necessary.
Targeted 6.4, but this also applies to 7.x.