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 @@ -256,13 +256,14 @@ You can also restrict the usage of a context to some groups::
256256 namespace App\Model;
257257
258258 use Symfony\Component\Serializer\Annotation\Context;
259+ use Symfony\Component\Serializer\Annotation\Groups;
259260 use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
260261
261262 class Person
262263 {
263- #[Serializer\ Groups(['extended'])]
264- #[Serializer\ Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
265- #[Serializer\ Context(
264+ #[Groups(['extended'])]
265+ #[Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
266+ #[Context(
266267 context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
267268 groups: ['extended'],
268269 )]
You can’t perform that action at this time.
0 commit comments