File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -246,13 +246,14 @@ You can also restrict the usage of a context to some groups::
246246 namespace App\Model;
247247
248248 use Symfony\Component\Serializer\Annotation\Context;
249+ use Symfony\Component\Serializer\Annotation\Groups;
249250 use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
250251
251252 class Person
252253 {
253- #[Serializer\ Groups(['extended'])]
254- #[Serializer\ Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
255- #[Serializer\ Context(
254+ #[Groups(['extended'])]
255+ #[Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
256+ #[Context(
256257 context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
257258 groups: ['extended'],
258259 )]
You can’t perform that action at this time.
0 commit comments