diff --git a/src/Symfony/Component/ErrorRenderer/Exception/FlattenException.php b/src/Symfony/Component/ErrorRenderer/Exception/FlattenException.php index 56a5221ed86ca..b02ecf5d22b47 100644 --- a/src/Symfony/Component/ErrorRenderer/Exception/FlattenException.php +++ b/src/Symfony/Component/ErrorRenderer/Exception/FlattenException.php @@ -37,6 +37,16 @@ class FlattenException private $file; private $line; + /** + * @deprecated since Symfony 4.4, use createFromThrowable() instead. + */ + public static function create(\Exception $exception, $statusCode = null, array $headers = []) + { + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, use "createFromThrowable()" instead.', __METHOD__), E_USER_DEPRECATED); + + return static::createFromThrowable($exception, $statusCode, $headers); + } + public static function createFromThrowable(\Throwable $exception, int $statusCode = null, array $headers = []): self { $e = new static();