Skip to content

Commit 3e417bf

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [Serializer] Fixup attributes import
2 parents 511d460 + de43ff1 commit 3e417bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

serializer.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,14 @@ You can also restrict the usage of a context to some groups::
239239
namespace App\Model;
240240

241241
use Symfony\Component\Serializer\Annotation\Context;
242+
use Symfony\Component\Serializer\Annotation\Groups;
242243
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
243244

244245
class Person
245246
{
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(
249250
context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
250251
groups: ['extended'],
251252
)]

0 commit comments

Comments
 (0)