Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:6.4fromMatTheCat:ticket_54570
May 17, 2025

Conversation

MatTheCat
Copy link
Contributor

@MatTheCatMatTheCat commentedMay 14, 2025
edited
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#54570
LicenseMIT

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 withRUNTIME_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 asIGNORE_ON_UNINITIALIZED_REFERENCE. This would changeDefinitionErrorExceptionPass::isErrorForRuntime() result and trigger a compile-time exception.

Following#60423 (comment), this PR makes theDefinitionErrorExceptionPass considerIGNORE_ON_UNINITIALIZED_REFERENCE the same way thanRUNTIME_EXCEPTION_ON_INVALID_REFERENCE to fix this issue.

floriankraemer reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

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?

@MatTheCat
Copy link
ContributorAuthor

Don’t know if it makes sense but it would also solve the issue yes.

@nicolas-grekas
Copy link
Member

It would to me yes!

@MatTheCatMatTheCat changed the title[DependencyInjection] Make theDefinitionErrorExceptionPass ignore the test container[DependencyInjection] MakeDefinitionErrorExceptionPass considerIGNORE_ON_UNINITIALIZED_REFERENCE andRUNTIME_EXCEPTION_ON_INVALID_REFERENCE the sameMay 16, 2025
@nicolas-grekas
Copy link
Member

It'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
@MatTheCat
Copy link
ContributorAuthor

Tests updated; failures are now unrelated!

@fabpot
Copy link
Member

Thank you@MatTheCat.

@fabpotfabpot merged commit334bd4f intosymfony:6.4May 17, 2025
9 of 11 checks passed
@MatTheCatMatTheCat deleted the ticket_54570 branchMay 17, 2025 10:29
This was referencedMay 25, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

4 participants
@MatTheCat@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp