8000 minor #36522 [FrameworkBundle] remove getContainer overwrites in test… · symfony/symfony@a2f0bf8 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2f0bf8

Browse files
minor #36522 [FrameworkBundle] remove getContainer overwrites in tests (Tobion)
This PR was merged into the 5.0 branch. Discussion ---------- [FrameworkBundle] remove getContainer overwrites in tests | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | | Doc PR | Since 5.0 the parent implementation throws an exception anyway making the overwrites obsolete, see #31202 Commits ------- 5ef9390 remove getContainer overwrites in tests
2 parents 22f1076 + 5ef9390 commit a2f0bf8

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Psr\Log\NullLogger;
1515
use Symfony\Component\Config\Loader\LoaderInterface;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
17-
use Symfony\Component\DependencyInjection\ContainerInterface;
1817
use Symfony\Component\Filesystem\Filesystem;
1918
use Symfony\Component\HttpKernel\Kernel;
2019

@@ -97,13 +96,4 @@ protected function getKernelParameters(): array
9796

9897
return $parameters;
9998
}
100-
101-
public function getContainer(): ContainerInterface
102-
{
103-
if (!$this->container) {
104-
throw new \LogicException('Cannot access the container on a non-booted kernel. Did you forget to boot it?');
105-
}
106-
107-
return parent::getContainer();
108-
}
10999
}

src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\app;
1313

1414
use Symfony\Component\Config\Loader\LoaderInterface;
15-
use Symfony\Component\DependencyInjection\ContainerInterface;
1615
use Symfony\Component\Filesystem\Filesystem;
1716
use Symfony\Component\HttpKernel\Kernel;
1817

@@ -99,13 +98,4 @@ protected function getKernelParameters(): array
9998

10099
return $parameters;
101100
}
102-
103-
public function getContainer(): ContainerInterface
104-
{
105-
if (!$this->container) {
106-
throw new \LogicException('Cannot access the container on a non-booted kernel. Did you forget to boot it?');
107-
}
108-
109-
return parent::getContainer();
110-
}
111101
}

0 commit comments

Comments
 (0)
0