-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service. #19902
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
Conversation
Will this also solve doctrine/DoctrineBundle#562? |
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.
Hello,
Thank you very much for your contribution... Could you re-insert the complete PR summary at the top of your PR. If a line seems irrelevant for your PR, just put N/A instead of removing it.
I think it would also be a nice touch to add a test for this behavior so we make sure the bug doesn't come back to haunt us later on.
@antanas-arvasevicius looking at your comment here, I think we can close this PR, isn't it? |
Hi, no this PR fixes the issue, I'll add some test cases to this PR and |
Because reading your comment, you say "it's not due lazy->lazy" :) |
Yes, that doctrine bug is not due lazy->lazy. It's due this bug which was |
So, what about:
|
It would be reasonable to do it conditionally because if proxy-manager |
I agree :) |
Anything to be done before merging this one? |
On Nov 10, 2016 2:26 AM, "Fabien Potencier" notifications@github.com
|
Hi, needed to add unit test with DI setup which shows correct behavior (no On Nov 10, 2016 7:32 AM, "Antanas Arvasevicius" <
|
if B is lazy and we can actually make it lazy (if we cannot generate the lazy proxy, it is the same than not being lazy) |
Right, but what's the point to allow lazy:true without proxy mngr? Are On Nov 10, 2016 12:11 PM, "Christophe Coevoet" notifications@github.com
|
At least for Open-Source bundles, people might tag a service as lazy as an optimization if the end user has the proxy manager and as a noop if it's not installed. |
Added unit tests, And also had found out that CheckCircularReferencesPass detects circular references. I've applied patch for that too. Please review. |
@fabpot could this be merged now? Or there are any problems? |
rebase needed |
Rebase onto what? Haven't thought that bug fix could take so long to be applied... I really do not understand how your bug fix apply policy works, but it sucks. Bye. |
A rebase on the target branch of this PR which is 2.7, since some other commits have changed some files modified in this PR, you need to resolve some conflicts so maintainers are able to merge it automatically. Thank you for contributing. |
… references in lazy service arguments.
Thanks for explanation. Now rebased my branch. Is this fix will be available in 2.8 .. 3.1 also? |
Yes it will ;) |
👍 Status: Reviewed |
👍 (the $isLazy temp var could be removed) |
Thank you @antanas-arvasevicius. |
…n't search references in lazy service. (antanas-arvasevicius) This PR was merged into the 2.7 branch. Discussion ---------- [DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service. | Q | A | | --- | --- | | Branch? | 2.7 | | Bug fix? | yes | | New feature? | yes | | BC breaks? | no | | Tests pass? | yes | | Fixed tickets | #19901 | | License | MIT | | Doc PR | N/A | more info: #19901 Commits ------- 595a978 [DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments.
Thank you @antanas-arvasevicius. |
@gxolin it's always the next release. So 2.7.22 |
no prob :) |
more info:
#19901