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 @@ -241,13 +241,14 @@ You can also restrict the usage of a context to some groups::
241241 namespace App\Model;
242242
243243 use Symfony\Component\Serializer\Annotation\Context;
244+ use Symfony\Component\Serializer\Annotation\Groups;
244245 use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
245246
246247 class Person
247248 {
248- #[Serializer\ Groups(['extended'])]
249- #[Serializer\ Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
250- #[Serializer\ Context(
249+ #[Groups(['extended'])]
250+ #[Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
251+ #[Context(
251252 context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
252253 groups: ['extended'],
253254 )]
You can’t perform that action at this time.
0 commit comments