From 5ef9390b2fb0a480527fb274443e1163c5f827e2 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Wed, 22 Apr 2020 02:33:26 +0200 Subject: [PATCH] remove getContainer overwrites in tests Since 5.0 the parent implementation throws an exception anyway making the overwrites obsolete, see https://github.com/symfony/symfony/pull/31202 --- .../FrameworkBundle/Tests/Functional/app/AppKernel.php | 10 ---------- .../SecurityBundle/Tests/Functional/app/AppKernel.php | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php index c6675c3b1a..0d329582b3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php @@ -14,7 +14,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\app; use Psr\Log\NullLogger; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Kernel; @@ -97,13 +96,4 @@ class AppKernel extends Kernel return $parameters; } - - public function getContainer(): ContainerInterface - { - if (!$this->container) { - throw new \LogicException('Cannot access the container on a non-booted kernel. Did you forget to boot it?'); - } - - return parent::getContainer(); - } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php index c4e7e4a15b..8e622282c2 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php @@ -12,7 +12,6 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\app; use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Kernel; @@ -99,13 +98,4 @@ class AppKernel extends Kernel return $parameters; } - - public function getContainer(): ContainerInterface - { - if (!$this->container) { - throw new \LogicException('Cannot access the container on a non-booted kernel. Did you forget to boot it?'); - } - - return parent::getContainer(); - } }