mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 20:36:33 +00:00
fix TwigExtraBundle tests with Symfony 6.0/6.1
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Twig\Extra\TwigExtraBundle\Tests\Fixture;
|
|||||||
use League\CommonMark\Extension\Strikethrough\StrikethroughExtension;
|
use League\CommonMark\Extension\Strikethrough\StrikethroughExtension;
|
||||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Test\NotificationAssertionsTrait;
|
||||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
@@ -29,11 +30,16 @@ class Kernel extends BaseKernel
|
|||||||
'test' => true,
|
'test' => true,
|
||||||
'router' => ['utf8' => true],
|
'router' => ['utf8' => true],
|
||||||
'http_method_override' => false,
|
'http_method_override' => false,
|
||||||
|
'php_errors' => [
|
||||||
|
'log' => true,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
if (6 === Kernel::MAJOR_VERSION) {
|
|
||||||
|
// the "handle_all_throwables" option was introduced in FrameworkBundle 6.2 (and so was the NotificationAssertionsTrait)
|
||||||
|
if (trait_exists(NotificationAssertionsTrait::class)) {
|
||||||
$config['handle_all_throwables'] = true;
|
$config['handle_all_throwables'] = true;
|
||||||
$config['php_errors']['log'] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$c->loadFromExtension('framework', $config);
|
$c->loadFromExtension('framework', $config);
|
||||||
$c->loadFromExtension('twig', [
|
$c->loadFromExtension('twig', [
|
||||||
'default_path' => __DIR__.'/views',
|
'default_path' => __DIR__.'/views',
|
||||||
|
|||||||
Reference in New Issue
Block a user