-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Skip errored definitions deep-referenced as runtime exceptions #50763
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
ec75183
to
a7b04d9
Compare
a7b04d9
to
fef31dc
Compare
Understand this has been merged/closed. Not seen any reports of this as of yet, however, I am getting this repeated
|
Same here. The other day I had an errored service definition and I also got the |
Please open a dedicated issue and provide a reproducer (even a private one you'd send me on Slack). Commenting on closed PRs doesn't work since we can't track those. |
Please also let me know if the following patch has any effect on your side, both in terms of memory and time: --- a/DefinitionErrorExceptionPass.php
+++ b/DefinitionErrorExceptionPass.php
@@ -71,7 +71,7 @@ class DefinitionErrorExceptionPass extends AbstractRecursivePass
}
}
- unset($this->sourceReferences[$id]);
+ unset($this->sourceReferences[$id], $this->targetReferences[$id]);
} |
… definitions (nicolas-grekas) This PR was merged into the 5.4 branch. Discussion ---------- [DepdencyInjection] Fix costly logic when checking errored definitions | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #50763 (comment) | License | MIT | Doc PR | - `@NicolJamie` `@X`-Coder264 can you please give this patch a try and report back. Does that fix the perf issue you're having? Commits ------- 81adcd6 [DepdencyInjection] Fix costly logic when checking errored definitions
This solves the linked issue by not throwing a compile-time error when the service graph looks like this (when ServiceC has errors):