Skip to content

Commit 6780781

Browse files
committed
Minor reword
1 parent 6b27438 commit 6780781

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

controller.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,8 @@ HTTP status to return if the validation fails::
451451

452452
The default status code returned if the validation fails is 404.
453453

454-
If the request query string is empty and if you still need to have a valid DTO, you can
455-
define a default value in your controller method::
454+
If you need a valid DTO even when the request query string is empty, set a
455+
default value for your controller arguments::
456456

457457
use App\Model\UserDto;
458458
use Symfony\Component\HttpFoundation\Response;
@@ -467,8 +467,6 @@ define a default value in your controller method::
467467
// ...
468468
}
469469

470-
In this case your DTO should have default values.
471-
472470
.. versionadded:: 6.3
473471

474472
The :class:`Symfony\\Component\\HttpKernel\\Attribute\\MapQueryString` attribute

0 commit comments

Comments
 (0)