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] MakeDefinitionErrorExceptionPass
considerIGNORE_ON_UNINITIALIZED_REFERENCE
andRUNTIME_EXCEPTION_ON_INVALID_REFERENCE
the same#60423
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
Would it make sense to say that if IGNORE_ON_UNINITIALIZED_REFERENCE is used, then RUNTIME_EXCEPTION_ON_INVALID_REFERENCE is implied? Would that fix the issue? |
Don’t know if it makes sense but it would also solve the issue yes. |
It would to me yes! |
DefinitionErrorExceptionPass
ignore the test containerDefinitionErrorExceptionPass
considerIGNORE_ON_UNINITIALIZED_REFERENCE
andRUNTIME_EXCEPTION_ON_INVALID_REFERENCE
the sameIt'd be great to have the test case in the DI component instead. That'd solve the deps=low failure also. |
…GNORE_ON_UNINITIALIZED_REFERENCE` and `RUNTIME_EXCEPTION_ON_INVALID_REFERENCE` the same
Tests updated; failures are now unrelated! |
Thank you@MatTheCat. |
334bd4f
intosymfony:6.4Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
The test container can make runtime errors appear at compile-time: say you have a private definition referenced by a controller. Such a reference would be configured with
RUNTIME_EXCEPTION_ON_INVALID_REFERENCE
, so if the private definition references an errored one, you’d get no exception at compile-time.Now, if this private definition is also referenced by the test container, it would be as
IGNORE_ON_UNINITIALIZED_REFERENCE
. This would changeDefinitionErrorExceptionPass::isErrorForRuntime()
result and trigger a compile-time exception.Following#60423 (comment), this PR makes the
DefinitionErrorExceptionPass
considerIGNORE_ON_UNINITIALIZED_REFERENCE
the same way thanRUNTIME_EXCEPTION_ON_INVALID_REFERENCE
to fix this issue.