Skip to content

Commit

Permalink
Try to make tests BC with Symfony 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed May 27, 2022
1 parent 034539a commit 8605d58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"symfony/framework-bundle": "^3.4.23|^4.2.4|^5.0",
"symfony/phpunit-bridge": ">= 6.0",
"symfony/routing": "^3.4.11|^4.0|^5.0",
"symfony/templating": "^3.4.11|^4.0|^5.0",
"symfony/twig-bundle": "^3.4.11|^4.0|^5.0",
"symfony/twig-bundle": "^4.4|^5.0",
"symfony/yaml": "^3.4.11|^4.0|^5.0"
},

Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/EndToEndTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ public function provideEsiShortcodes(): \Generator

private function renderTwig(string $templateCode, array $context = [], Request $request = null): string
{
self::bootKernel();
$kernel = self::bootKernel();

$container = static::getContainer();
$container = $kernel->getContainer(); // BC with Symfony 3.4

$requestStack = $container->get(RequestStack::class);
$requestStack = $container->get('request_stack'); // BC with Symfony 3.4
$requestStack->push($request ?? new Request());

$twig = $container->get('twig');
Expand Down

0 comments on commit 8605d58

Please sign in to comment.