File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -451,8 +451,8 @@ HTTP status to return if the validation fails::
451
451
452
452
The default status code returned if the validation fails is 404.
453
453
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 ::
456
456
457
457
use App\Model\UserDto;
458
458
use Symfony\Component\HttpFoundation\Response;
@@ -467,8 +467,6 @@ define a default value in your controller method::
467
467
// ...
468
468
}
469
469
470
- In this case your DTO should have default values.
471
-
472
470
.. versionadded :: 6.3
473
471
474
472
The :class: `Symfony\\ Component\\ HttpKernel\\ Attribute\\ MapQueryString ` attribute
You can’t perform that action at this time.
0 commit comments