[TwigBundle] Fix deprecated use of FlattenException

This commit is contained in:
Hippolyte Alain 2015-04-27 14:57:27 +02:00
parent 7c5337367a
commit 4d2f0442f4
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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