Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41bea4e

Browse files
mdoutreluingnejaviereguiluz
authored andcommitted
Add message to #[MapEntity] for NotFoundHttpException
1 parentce23225 commit41bea4e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎doctrine.rst‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,21 @@ control behavior:
820820
``disabled``
821821
If true, the ``EntityValueResolver`` will not try to replace the argument.
822822

823+
``message``
824+
If a ``message`` option is configured, the value of the ``message`` option will be displayed in the development
825+
environment for the:class:`Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException` exception::
826+
827+
#[Route('/product/{product_id}')]
828+
public function show(
829+
#[MapEntity(id: 'product_id', message: 'The product does not exist')]
830+
Product $product
831+
): Response {
832+
}
833+
834+
..versionadded::7.1
835+
836+
The ``message`` option was introduced in Symfony 7.1.
837+
823838
Updating an Object
824839
------------------
825840

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp