Skip to content

Commit d9a4916

Browse files
committed
minor #19856 Update controller.rst, fix use statement App\Model\UserDto (gladx)
This PR was submitted for the 7.0 branch but it was merged into the 6.4 branch instead. Discussion ---------- Update controller.rst, fix use statement App\Model\UserDto In use statement use wrong case, then this error happens 'Case mismatch between loaded and declared class names: "App\Model\UserDto" vs "App\Model\UserDTO". ', https://stackoverflow.com/questions/78352633/controller-returning-500-could-not-denormalize-object-of-type/78420166 <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- 6782a79 Update controller.rst
2 parents a38f2be + 6782a79 commit d9a4916

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

controller.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ optional validation constraints::
419419
You can then use the :class:`Symfony\\Component\\HttpKernel\\Attribute\\MapQueryString`
420420
attribute in your controller::
421421

422-
use App\Model\UserDto;
422+
use App\Model\UserDTO;
423423
use Symfony\Component\HttpFoundation\Response;
424424
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
425425

@@ -454,7 +454,7 @@ The default status code returned if the validation fails is 404.
454454
If you need a valid DTO even when the request query string is empty, set a
455455
default value for your controller arguments::
456456

457-
use App\Model\UserDto;
457+
use App\Model\UserDTO;
458458
use Symfony\Component\HttpFoundation\Response;
459459
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
460460

@@ -497,7 +497,7 @@ In this case, it is also possible to directly map this payload to your DTO by
497497
using the :class:`Symfony\\Component\\HttpKernel\\Attribute\\MapRequestPayload`
498498
attribute::
499499

500-
use App\Model\UserDto;
500+
use App\Model\UserDTO;
501501
use Symfony\Component\HttpFoundation\Response;
502502
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
503503

0 commit comments

Comments
 (0)