Skip to content

Commit 4d22728

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [Serializer] Fixup attributes import
2 parents 41c05cd + 3e417bf commit 4d22728

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
@@ -246,13 +246,14 @@ You can also restrict the usage of a context to some groups::
246246
namespace App\Model;
247247

248248
use Symfony\Component\Serializer\Annotation\Context;
249+
use Symfony\Component\Serializer\Annotation\Groups;
249250
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
250251

251252
class Person
252253
{
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(
256257
context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
257258
groups: ['extended'],
258259
)]

0 commit comments

Comments
 (0)