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 https://github.com/symfony/symfony/pull/31202

Commits
-------

5ef9390b2f remove getContainer overwrites in tests
This commit is contained in:
Nicolas Grekas 2020-04-22 11:08:16 +02:00
commit a2f0bf89d7
2 changed files with 0 additions and 20 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}