File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,50 @@ value:
491491 $framework->serializer()->nameConverter('serializer.name_converter.camel_case_to_snake_case');
492492 };
493493
494+ Debugging the Serializer
495+ ------------------------
496+
497+ Use the ``debug:serializer `` command to dump the serializer metadata of a
498+ given class:
499+
500+ .. code-block :: terminal
501+
502+ $ php bin/console debug:serializer 'App\Entity\Book'
503+
504+ App\Entity\Book
505+ ---------------
506+
507+ +----------+------------------------------------------------------------+
508+ | Property | Options |
509+ +----------+------------------------------------------------------------+
510+ | name | [ |
511+ | | "groups" => [ |
512+ | | "book:read", |
513+ | | "book:write", |
514+ | | ] |
515+ | | "maxDepth" => 1, |
516+ | | "serializedName" => "book_name" |
517+ | | "ignore" => false |
518+ | | "normalizationContexts" => [], |
519+ | | "denormalizationContexts" => [] |
520+ | | ] |
521+ | isbn | [ |
522+ | | "groups" => [ |
523+ | | "book:read", |
524+ | | ] |
525+ | | "maxDepth" => null, |
526+ | | "serializedName" => null |
527+ | | "ignore" => false |
528+ | | "normalizationContexts" => [], |
529+ | | "denormalizationContexts" => [] |
530+ | | ] |
531+ +----------+------------------------------------------------------------+
532+
533+ .. versionadded :: 6.3
534+
535+ The debug:serializer`` command was introduced in Symfony 6.3.
536+
537+
494538Going Further with the Serializer
495539---------------------------------
496540
You can’t perform that action at this time.
0 commit comments