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 @@ -246,13 +246,14 @@ You can also restrict the usage of a context to some groups::
246
246
namespace App\Model;
247
247
248
248
use Symfony\Component\Serializer\Annotation\Context;
249
+ use Symfony\Component\Serializer\Annotation\Groups;
249
250
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
250
251
251
252
class Person
252
253
{
253
- #[Serializer\ Groups(['extended'])]
254
- #[Serializer\ Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
255
- #[Serializer\ Context(
254
+ #[Groups(['extended'])]
255
+ #[Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
256
+ #[Context(
256
257
context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
257
258
groups: ['extended'],
258
259
)]
You can’t perform that action at this time.
0 commit comments