8000 [FrameworkBundle] Deprecate `framework:exceptions` XML tag by MatTheCat · Pull Request #48665 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Deprecate framework:exceptions XML tag #48665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
31 changes: 31 additions & 0 deletions UPGRADE-6.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<!-- config/packages/framework.xml -->
<framework:config>
<framework:exceptions>
<framework:exception
name="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
log-level="info"
status-code="422"
/>
</framework:exceptions>
</framework:config>
```

After:
```xml
<!-- config/packages/framework.xml -->
<framework:config>
<framework:exception
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
log-level="info"
status-code="422"
/>
</framework:config>
```

HttpKernel
----------

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand Down
0