bug #14480 [TwigBundle] Fix deprecated use of FlattenException (alOneh)
This PR was merged into the 2.6 branch.
Discussion
----------
[TwigBundle] Fix deprecated use of FlattenException
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
4d2f044
[TwigBundle] Fix deprecated use of FlattenException
This commit is contained in:
commit
1439da4c30
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\TwigBundle\Controller;
|
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\HttpKernel\HttpKernelInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class PreviewErrorController
|
|||||||
|
|
||||||
public function previewErrorPageAction(Request $request, $code)
|
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
|
* 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\Tests\TestCase;
|
||||||
use Symfony\Bundle\TwigBundle\Controller\ExceptionController;
|
use Symfony\Bundle\TwigBundle\Controller\ExceptionController;
|
||||||
use Symfony\Component\HttpKernel\Exception\FlattenException;
|
use Symfony\Component\Debug\Exception\FlattenException;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
class ExceptionControllerTest extends TestCase
|
class ExceptionControllerTest extends TestCase
|
||||||
|
Reference in New Issue
Block a user