8000 [FrameworkBundle] Deprecate `framework:exceptions` XML tag · symfony/symfony@b5eda47 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5eda47

Browse files
MatTheCatfabpot
authored andcommitted
[FrameworkBundle] Deprecate framework:exceptions XML tag
1 parent ff6913e commit b5eda47

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

UPGRADE-6.3.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ DependencyInjection
77
* Deprecate `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use `inline_factories` and `inline_class_loader` instead
88
* Deprecate undefined and numeric keys with `service_locator` config, use string aliases instead
99

10+
FrameworkBundle
11+
---------------
12+
13+
* Deprecate `framework:exceptions` tag, unwrap it and replace `framework:exception` tags' `name` attribute by `class`
14+
15+
Before:
16+
```xml
17+
<!-- config/packages/framework.xml -->
18+
<framework:config>
19+
<framework:exceptions>
20+
<framework:exception
21+
name="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
22+
log-level="info"
23+
status-code="422"
24+
/>
25+
</framework:exceptions>
26+
</framework:config>
27+
```
28+
29+
After:
30+
```xml
31+
<!-- config/packages/framework.xml -->
32+
<framework:config>
33+
<framework:exception
34+
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
35+
log-level="info"
36+
status-code="422"
37+
/>
38+
</framework:config>
39+
```
40+
1041
HttpKernel
1142
----------
1243

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
* Allow to avoid `limit` definition in a RateLimiter configuration when using the `no_limit` policy
99
* Add `--format` option to the `debug:config` command
1010
* Add support to pass namespace wildcard in `framework.messenger.routing`
11+
* Deprecate `framework:exceptions` tag, unwrap it and replace `framework:exception` tags' `name` attribute by `class`
1112

1213
6.2
1314
---

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,8 @@ private function addExceptionsSection(ArrayNodeDefinition $rootNode)
12021202
return $v;
12031203
}
12041204

1205+
trigger_deprecation('symfony/framework-bundle', '6.3', '"framework:exceptions" tag is deprecated. Unwrap it and replace your "framework:exception" tags\' "name" attribute by "class".');
1206+
12051207
$v = $v['exception'];
12061208
unset($v['exception']);
12071209

0 commit comments

Comments
 (0)
0