From b5eda47d913b5bfcc5a383da32fc92ac124ab880 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Thu, 15 Dec 2022 16:14:57 +0100 Subject: [PATCH] [FrameworkBundle] Deprecate `framework:exceptions` XML tag --- UPGRADE-6.3.md | 31 +++++++++++++++++++ .../Bundle/FrameworkBundle/CHANGELOG.md | 1 + .../DependencyInjection/Configuration.php | 2 ++ 3 files changed, 34 insertions(+) diff --git a/UPGRADE-6.3.md b/UPGRADE-6.3.md index 58949b88e408d..d3c51e2acc394 100644 --- a/UPGRADE-6.3.md +++ b/UPGRADE-6.3.md @@ -7,6 +7,37 @@ DependencyInjection * Deprecate `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use `inline_factories` and `inline_class_loader` instead * Deprecate undefined and numeric keys with `service_locator` config, use string aliases instead +FrameworkBundle +--------------- + + * Deprecate `framework:exceptions` tag, unwrap it and replace `framework:exception` tags' `name` attribute by `class` + + Before: + ```xml + + + + + + + ``` + + After: + ```xml + + + + + ``` + HttpKernel ---------- diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 2967592e00109..443b2e2792371 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG * Allow to avoid `limit` definition in a RateLimiter configuration when using the `no_limit` policy * Add `--format` option to the `debug:config` command * Add support to pass namespace wildcard in `framework.messenger.routing` + * Deprecate `framework:exceptions` tag, unwrap it and replace `framework:exception` tags' `name` attribute by `class` 6.2 --- diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index f83969ea48d6b..44e812e735538 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -1202,6 +1202,8 @@ private function addExceptionsSection(ArrayNodeDefinition $rootNode) return $v; } + trigger_deprecation('symfony/framework-bundle', '6.3', '"framework:exceptions" tag is deprecated. Unwrap it and replace your "framework:exception" tags\' "name" attribute by "class".'); + $v = $v['exception']; unset($v['exception']);