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::
239
239
namespace App\Model;
240
240
241
241
use Symfony\Component\Serializer\Annotation\Context;
242
+ use Symfony\Component\Serializer\Annotation\Groups;
242
243
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
243
244
244
245
class Person
245
246
{
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(
249
250
context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
250
251
groups: ['extended'],
251
252
)]
You can’t perform that action at this time.
0 commit comments