Skip to content

Commit 9bac485

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Update `framework.exceptions` XML and PHP configuration examples
2 parents 126baa1 + 7244a1a commit 9bac485

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

reference/configuration/framework.rst

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3568,12 +3568,11 @@ exceptions that match the given exception class:
35683568
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
35693569
35703570
<framework:config>
3571-
<framework:exceptions>
3572-
<exception id="Symfony\Component\HttpKernel\Exception\BadRequestHttpException">
3573-
<framework:log_level>debug</framework:log_level>
3574-
<framework:status_code>422</framework:status_code>
3575-
</exception>
3576-
</framework:exceptions>
3571+
<framework:exception
3572+
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
3573+
log-level="debug"
3574+
status-code="422"
3575+
/>
35773576
<!-- ... -->
35783577
</framework:config>
35793578
</container>
@@ -3585,13 +3584,9 @@ exceptions that match the given exception class:
35853584
use Symfony\Config\FrameworkConfig;
35863585
35873586
return static function (FrameworkConfig $framework) {
3588-
$framework
3589-
->exceptions(BadRequestHttpException::class)
3590-
->log_level('debug');
3591-
3592-
$framework
3593-
->exceptions(BadRequestHttpException::class)
3594-
->status_code(422);
3587+
$framework->exception(BadRequestHttpException::class)
3588+
->logLevel('debug')
3589+
->statusCode(422)
35953590
;
35963591
};
35973592

0 commit comments

Comments
 (0)