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 @@ -239,13 +239,14 @@ You can also restrict the usage of a context to some groups::
239239 namespace App\Model;
240240
241241 use Symfony\Component\Serializer\Annotation\Context;
242+ use Symfony\Component\Serializer\Annotation\Groups;
242243 use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
243244
244245 class Person
245246 {
246- #[Serializer\ Groups(['extended'])]
247- #[Serializer\ Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
248- #[Serializer\ Context(
247+ #[Groups(['extended'])]
248+ #[Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
249+ #[Context(
249250 context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
250251 groups: ['extended'],
251252 )]
You can’t perform that action at this time.
0 commit comments