8000 Created alias to FlattenException to avoid BC break · symfony/symfony@7b11821 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b11821

Browse files
committed
Created alias to FlattenException to avoid BC break
1 parent bb74384 commit 7b11821

File tree

3 files changed

+31
-0
lines changed
8000

3 files changed

+31
-0
lines changed

src/Symfony/Component/ErrorRenderer/Exception/FlattenException.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,8 @@ public function getAsString()
374374
return rtrim($message);
375375
}
376376
}
377+
378+
// to be removed in 5.0
379+
if (!class_exists(\Symfony\Component\Debug\Exception\FlattenException::class, false)) {
380+
class_alias(FlattenException::class, \Symfony\Component\Debug\Exception\FlattenException::class);
381+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
class_exists(\Symfony\Component\ErrorRenderer\Exception\FlattenException::class);
17+
18+
if (false) {
19+
/**
20+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorRenderer\Exception\FlattenException instead.
21+
*/
22+
class FlattenException extends \Symfony\Component\ErrorRenderer\Exception\FlattenException
23+
{
24+
}
25+
}

src/Symfony/Component/ErrorRenderer/composer.json

Lines changed: 1 addition & 0 deletions
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)
0