Commit 25c5f9c
committed
bug symfony#58327 [FrameworkBundle] Do not access the container when the kernel is shut down (jderusse)
This PR was merged into the 5.4 branch.
Discussion
----------
[FrameworkBundle] Do not access the container when the kernel is shut down
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
symfony#58240 play with the container after the kernel was shut down.
This is an issue when the kernel performs a cleanup operation. For instance, the `@Nyholm` TestBundle [deletes cache files](https://github.com/SymfonyTest/symfony-bundle-test/blob/241bf0e2f00f28f7327113570ab20e24a5828829/src/TestKernel.php#L184-L199) as a result, the service is not accessible anymore and triggers errors.
This PR move the call to `container->get` before `kernel::shutdown`
Commits
-------
e68f88c [FrameworkBundle] Do not access the container when the kernel is shut down1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | 160 | | |
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
0 commit comments