Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues #62547
License MIT

The BC layer brought by #61860 doesn't work: as described in #62547, the first call to load() has side effects which can break when the second and fallback call is made.

I don't see any other way. Well, one would be to operate on a clone, and if that works, rerun with the real container builder. But the overhead is going to be high for everybody.

I'm therefor proposing to change this as a BC BREAK. While less than ideal, this happens at compile time, and the fix is trivial and explained in the error message.

@nicolas-grekas nicolas-grekas force-pushed the di-loader-throw branch 2 times, most recently from 1a5091e to bf44156 Compare December 4, 2025 16:10
…from PHP config files; use the `$loader` variable instead
@nicolas-grekas nicolas-grekas merged commit 0e8ae8f into symfony:7.4 Dec 4, 2025
4 of 12 checks passed
nicolas-grekas added a commit that referenced this pull request Dec 4, 2025
…kas)

This PR was merged into the 6.4 branch.

Discussion
----------

[SecurityBundle] Fix tests with Symfony 7.4

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Needed after #62646

Commits
-------

6d8c5ed [SecurityBundle] Fix tests with Symfony 7.4
@nicolas-grekas nicolas-grekas deleted the di-loader-throw branch December 7, 2025 10:48
This was referenced Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants