You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #34078 [FrameworkBundle] Don't reset the test container but the real one instead (nicolas-grekas)
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Don't reset the test container but the real one instead
| Q | A
| ------------- | ---
| Branch? | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | -
After #31202 and #32056, the tearDown method keeps throwing deprecation notices about "Getting the container from a non-booted kernel". The reason is that resetting the test-container calls `$kernel->getContainer()` while the kernel has been shut down.
This fixes it and a few other glitches found meanwhile.
Commits
-------
8e16143 [FrameworkBundle] Dont reset the test container but the real one instead
Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,8 +222,7 @@ Form
222
222
FrameworkBundle
223
223
---------------
224
224
225
-
* Dropped support for booting the kernel before running `WebTestCase::createClient()`. `createClient()` will throw an
226
-
exception if the kernel was already booted before.
225
+
* Calling `WebTestCase::createClient()` while a kernel has been booted now throws an exception, ensure the kernel is shut down before calling the method
227
226
* Removed the `framework.templating` option, configure the Twig bundle instead.
228
227
* The project dir argument of the constructor of `AssetsInstallCommand` is required.
229
228
* Removed support for `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method`
@trigger_error(sprintf('Booting the kernel before calling %s() is deprecated and will throw in Symfony 5.0, the kernel should only be booted once.', __METHOD__), E_USER_DEPRECATED);
44
+
if (static::$booted) {
45
+
@trigger_error(sprintf('Calling "%s()" while a kernel has been booted is deprecated since Symfony 4.4 and will throw in 5.0, ensure the kernel is shut down before calling the method.', __METHOD__), E_USER_DEPRECATED);
0 commit comments