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