Skip to content

Commit 3808b7e

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Use ::class keyword when possible
2 parents 2feae16 + 12f82c4 commit 3808b7e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tests/DependencyInjection/Compiler/ExtensionPassTest.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\Twig\AppVariable;
1516
use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass;
17+
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
1618
use Symfony\Bundle\TwigBundle\TemplateIterator;
19+
use Symfony\Bundle\TwigBundle\TwigEngine;
1720
use Symfony\Component\DependencyInjection\ContainerBuilder;
1821
use Symfony\Component\DependencyInjection\Definition;
22+
use Twig\Loader\FilesystemLoader as TwigFilesystemLoader;
1923

2024
class ExtensionPassTest extends TestCase
2125
{
@@ -24,12 +28,12 @@ public function testProcessDoesNotDropExistingFileLoaderMethodCalls()
2428
$container = new ContainerBuilder();
2529
$container->setParameter('kernel.debug', false);
2630

27-
$container->register('twig.app_variable', '\Symfony\Bridge\Twig\AppVariable');
31+
$container->register('twig.app_variable', AppVariable::class);
2832
$container->register('twig.extension.yaml');
2933
$container->register('twig.extension.debug.stopwatch');
3034
$container->register('twig.extension.expression');
3135

32-
$nativeTwigLoader = new Definition('\Twig\Loader\FilesystemLoader');
36+
$nativeTwigLoader = new Definition(TwigFilesystemLoader::class);
3337
$nativeTwigLoader->addMethodCall('addPath', []);
3438
$container->setDefinition('twig.loader.native_filesystem', $nativeTwigLoader);
3539

0 commit comments

Comments
 (0)