[TwigBundle] Fix deprecated use of FlattenException
This commit is contained in:
parent
7c5337367a
commit
4d2f0442f4
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\TwigBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpKernel\Exception\FlattenException;
|
||||
use Symfony\Component\Debug\Exception\FlattenException;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
@ -35,7 +35,7 @@ class PreviewErrorController
|
||||
|
||||
public function previewErrorPageAction(Request $request, $code)
|
||||
{
|
||||
$exception = FlattenException::create(new \Exception("Something has intentionally gone wrong."), $code);
|
||||
$exception = FlattenException::create(new \Exception('Something has intentionally gone wrong.'), $code);
|
||||
|
||||
/*
|
||||
* This Request mimics the parameters set by
|
||||
|
@ -13,7 +13,7 @@ namespace Symfony\Bundle\TwigBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\TwigBundle\Tests\TestCase;
|
||||
use Symfony\Bundle\TwigBundle\Controller\ExceptionController;
|
||||
use Symfony\Component\HttpKernel\Exception\FlattenException;
|
||||
use Symfony\Component\Debug\Exception\FlattenException;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class ExceptionControllerTest extends TestCase
|
||||
|
Reference in New Issue
Block a user