Skip to content

Commit 1c08252

Browse files
authored
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 9148e46 commit 1c08252

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
@@ -410,7 +410,7 @@ optional validation constraints::
410410
You can then use the :class:`Symfony\\Component\\HttpKernel\\Attribute\\MapQueryString`
411411
attribute in your controller::
412412

413-
use App\Model\UserDto;
413+
use App\Model\UserDTO;
414414
use Symfony\Component\HttpFoundation\Response;
415415
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
416416

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

448-
use App\Model\UserDto;
448+
use App\Model\UserDTO;
449449
use Symfony\Component\HttpFoundation\Response;
450450
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
451451

@@ -479,7 +479,7 @@ In this case, it is also possible to directly map this payload to your DTO by
479479
using the :class:`Symfony\\Component\\HttpKernel\\Attribute\\MapRequestPayload`
480480
attribute::
481481

482-
use App\Model\UserDto;
482+
use App\Model\UserDTO;
483483
use Symfony\Component\HttpFoundation\Response;
484484
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
485485

0 commit comments

Comments
 (0)