Skip to content

Commit

Permalink
Merge 3.x into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Jul 6, 2019
2 parents 6291085 + a94cc70 commit d6bc1fc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Controller/HelperController.php
Expand Up @@ -44,7 +44,7 @@
class HelperController
{
/**
* @var \Twig_Environment
* @var Environment
*/
protected $twig;

Expand Down
3 changes: 2 additions & 1 deletion tests/Controller/CRUDControllerTest.php
Expand Up @@ -59,6 +59,7 @@
use Symfony\Component\Security\Csrf\CsrfToken;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Twig\Environment;

/**
* Test for CRUDController.
Expand Down Expand Up @@ -195,7 +196,7 @@ protected function setUp(): void

$this->session = new Session(new MockArraySessionStorage());

$twig = $this->getMockBuilder(\Twig_Environment::class)
$twig = $this->getMockBuilder(Environment::class)
->disableOriginalConstructor()
->getMock();

Expand Down
3 changes: 2 additions & 1 deletion tests/Form/Widget/BaseWidgetTest.php
Expand Up @@ -17,6 +17,7 @@
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
use Twig\Environment;

/**
* Base class for tests checking rendering of form widgets with form_admin_fields.html.twig and
Expand Down Expand Up @@ -66,7 +67,7 @@ protected function getEnvironment()
/**
* {@inheritdoc}
*/
protected function getRenderingEngine(\Twig_Environment $environment = null)
protected function getRenderingEngine(Environment $environment = null)
{
if (!\in_array($this->type, ['form', 'filter'], true)) {
throw new \Exception('Please override $this->type in your test class specifying template to use (either form or filter)');
Expand Down
3 changes: 2 additions & 1 deletion tests/Menu/Integration/BaseMenuTest.php
Expand Up @@ -20,6 +20,7 @@
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubFilesystemLoader;
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
use Twig\Environment;

/**
* Base class for tests checking rendering of twig templates.
Expand All @@ -39,7 +40,7 @@ public function setUp(): void
], 'is_dir');

$loader = new StubFilesystemLoader($twigPaths);
$this->environment = new \Twig_Environment($loader, ['strict_variables' => true]);
$this->environment = new Environment($loader, ['strict_variables' => true]);
}

abstract protected function getTemplate();
Expand Down
5 changes: 3 additions & 2 deletions tests/Twig/Extension/SonataAdminExtensionTest.php
Expand Up @@ -40,6 +40,7 @@
use Symfony\Component\Translation\MessageSelector;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\TranslatorInterface;
use Twig\Environment;

/**
* Test for SonataAdminExtension.
Expand All @@ -54,7 +55,7 @@ class SonataAdminExtensionTest extends TestCase
private $twigExtension;

/**
* @var \Twig_Environment
* @var Environment
*/
private $environment;

Expand Down Expand Up @@ -178,7 +179,7 @@ class_exists(TranslationDumperPass::class) ? null : new MessageSelector()
]);
$loader->addPath(__DIR__.'/../../../src/Resources/views/', 'SonataAdmin');

$this->environment = new \Twig_Environment($loader, [
$this->environment = new Environment($loader, [
'strict_variables' => true,
'cache' => false,
'autoescape' => 'html',
Expand Down

0 comments on commit d6bc1fc

Please sign in to comment.