Skip to content

Commit 49b93ba

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Update `framework.exceptions` XML and PHP configuration examples
2 parents d456a53 + 9bac485 commit 49b93ba

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
@@ -3580,12 +3580,11 @@ exceptions that match the given exception class:
35803580
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
35813581
35823582
<framework:config>
3583-
<framework:exceptions>
3584-
<exception id="Symfony\Component\HttpKernel\Exception\BadRequestHttpException">
3585-
<framework:log_level>debug</framework:log_level>
3586-
<framework:status_code>422</framework:status_code>
3587-
</exception>
3588-
</framework:exceptions>
3583+
<framework:exception
3584+
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
3585+
log-level="debug"
3586+
status-code="422"
3587+
/>
35893588
<!-- ... -->
35903589
</framework:config>
35913590
</container>
@@ -3597,13 +3596,9 @@ exceptions that match the given exception class:
35973596
use Symfony\Config\FrameworkConfig;
35983597
35993598
return static function (FrameworkConfig $framework) {
3600-
$framework
3601-
->exceptions(BadRequestHttpException::class)
3602-
->log_level('debug');
3603-
3604-
$framework
3605-
->exceptions(BadRequestHttpException::class)
3606-
->status_code(422);
3599+
$framework->exception(BadRequestHttpException::class)
3600+
->logLevel('debug')
3601+
->statusCode(422)
36073602
;
36083603
};
36093604

0 commit comments

Comments
 (0)