File tree Expand file tree Collapse file tree 3 files changed +2
-25
lines changed
src/Symfony/Component/HttpKernel Expand file tree Collapse file tree 3 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CHANGELOG
4
4
5.0.0
5
5
-----
6
6
7
+ * removed support for getting the container from a non-booted kernel
7
8
* removed the first and second constructor argument of ` ConfigDataCollector `
8
9
* removed ` ConfigDataCollector::getApplicationName() `
9
10
* removed ` ConfigDataCollector::getApplicationVersion() `
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ public function getProjectDir()
301
301
public function getContainer ()
302
302
{
303
303
if (!$ this ->booted ) {
304
- @ trigger_error ( ' Getting the container from a non-booted kernel is deprecated since Symfony 4.4. ' , E_USER_DEPRECATED );
304
+ throw new \ LogicException ( ' Cannot retrieve the container from a non-booted kernel. ' );
305
305
}
306
306
307
307
return $ this ->container ;
Original file line number Diff line number Diff line change @@ -47,18 +47,6 @@ public function testConstructor()
47
47
$ this ->assertLessThanOrEqual (microtime (true ), $ kernel ->getStartTime ());
48
48
}
49
49
50
- /**
51
- * @group legacy
52
- * @expectedDeprecation Getting the container from a non-booted kernel is deprecated since Symfony 4.4.
53
- */
54
- public function testGetContainerForANonBootedKernel ()
55
- {
56
- $ kernel = new KernelForTest ('test_env ' , true );
57
-
58
- $ this ->assertFalse ($ kernel ->isBooted ());
59
- $ this ->assertNull ($ kernel ->getContainer ());
60
- }
61
-
62
50
public function testClone ()
63
51
{
64
52
$ env = 'test_env ' ;
@@ -407,18 +395,6 @@ public function testTerminateReturnsSilentlyIfKernelIsNotBooted()
407
395
$ kernel ->terminate (Request::create ('/ ' ), new Response ());
408
396
}
409
397
410
- /**
411
- * @group legacy
412
- * @expectedDeprecation Getting the container from a non-booted kernel is deprecated since Symfony 4.4.
413
- */
414
- public function testDeprecatedNullKernel ()
415
- {
416
- $ kernel = $ this ->getKernel ();
417
- $ kernel ->shutdown ();
418
-
419
- $ this ->assertNull ($ kernel ->getContainer ());
420
- }
421
-
422
398
public function testTerminateDelegatesTerminationOnlyForTerminableInterface ()
423
399
{
424
400
// does not implement TerminableInterface
You can’t perform that action at this time.
0 commit comments