Skip to content

Commit 948f32e

Browse files
committed
Created alias to FlattenException to avoid BC break
1 parent bb74384 commit 948f32e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Debug\Exception;
13+
14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', FlattenException::class, \Symfony\Component\ErrorRenderer\Exception\FlattenException::class), E_USER_DEPRECATED);
15+
16+
if (!class_exists(FlattenException::class, false)) {
17+
class_alias(\Symfony\Component\ErrorRenderer\Exception\FlattenException::class, FlattenException::class);
18+
}
19+
20+
if (false) {
21+
/**
22+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorRenderer\Exception\FlattenException instead.
23+
*/
24+
class FlattenException extends \Symfony\Component\ErrorRenderer\Exception\FlattenException
25+
{
26+
}
27+
}

src/Symfony/Component/ErrorRenderer/composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
},
3030
"autoload": {
3131
"psr-4": { "Symfony\\Component\\ErrorRenderer\\": "" },
32+
"classmap": [ "Resources/stubs/Exception/FlattenException.php" ],
3233
"exclude-from-classmap": [
3334
"/Tests/"
3435
]

0 commit comments

Comments
 (0)