Skip to content

Commit c8af51a

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Update `framework.exceptions` XML and PHP configuration examples
2 parents 193f89b + 8b8cf56 commit c8af51a

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
@@ -3421,12 +3421,11 @@ exceptions that match the given exception class:
34213421
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
34223422
34233423
<framework:config>
3424-
<framework:exceptions>
3425-
<exception id="Symfony\Component\HttpKernel\Exception\BadRequestHttpException">
3426-
<framework:log_level>debug</framework:log_level>
3427-
<framework:status_code>422</framework:status_code>
3428-
</exception>
3429-
</framework:exceptions>
3424+
<framework:exception
3425+
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
3426+
log-level="debug"
3427+
status-code="422"
3428+
/>
34303429
<!-- ... -->
34313430
</framework:config>
34323431
</container>
@@ -3438,13 +3437,9 @@ exceptions that match the given exception class:
34383437
use Symfony\Config\FrameworkConfig;
34393438
34403439
return static function (FrameworkConfig $framework) {
3441-
$framework
3442-
->exceptions(BadRequestHttpException::class)
3443-
->log_level('debug');
3444-
3445-
$framework
3446-
->exceptions(BadRequestHttpException::class)
3447-
->status_code(422);
3440+
$framework->exception(BadRequestHttpException::class)
3441+
->logLevel('debug')
3442+
->statusCode(422)
34483443
;
34493444
};
34503445

0 commit comments

Comments
 (0)