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::
256
256
namespace App\Model;
257
257
258
258
use Symfony\Component\Serializer\Annotation\Context;
259
+ use Symfony\Component\Serializer\Annotation\Groups;
259
260
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
260
261
261
262
class Person
262
263
{
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(
266
267
context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
267
268
groups: ['extended'],
268
269
)]
You can’t perform that action at this time.
0 commit comments