Skip to content

Commit 7244a1a

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: Update `framework.exceptions` XML and PHP configuration examples
2 parents 9b66694 + c8af51a commit 7244a1a

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
@@ -3518,12 +3518,11 @@ exceptions that match the given exception class:
35183518
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
35193519
35203520
<framework:config>
3521-
<framework:exceptions>
3522-
<exception id="Symfony\Component\HttpKernel\Exception\BadRequestHttpException">
3523-
<framework:log_level>debug</framework:log_level>
3524-
<framework:status_code>422</framework:status_code>
3525-
</exception>
3526-
</framework:exceptions>
3521+
<framework:exception
3522+
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
3523+
log-level="debug"
3524+
status-code="422"
3525+
/>
35273526
<!-- ... -->
35283527
</framework:config>
35293528
</container>
@@ -3535,13 +3534,9 @@ exceptions that match the given exception class:
35353534
use Symfony\Config\FrameworkConfig;
35363535
35373536
return static function (FrameworkConfig $framework) {
3538-
$framework
3539-
->exceptions(BadRequestHttpException::class)
3540-
->log_level('debug');
3541-
3542-
$framework
3543-
->exceptions(BadRequestHttpException::class)
3544-
->status_code(422);
3537+
$framework->exception(BadRequestHttpException::class)
3538+
->logLevel('debug')
3539+
->statusCode(422)
35453540
;
35463541
};
35473542

0 commit comments

Comments
 (0)