Skip to content

Commit 6782a79

Browse files
gladxjaviereguiluz
authored andcommitted
Update controller.rst
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
1 parent a38f2be commit 6782a79

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)