@@ -293,35 +293,6 @@ Then, create your groups definition:
293293
294294.. configuration-block ::
295295
296- .. code-block :: php-annotations
297-
298- namespace Acme;
299-
300- use Symfony\Component\Serializer\Annotation\Groups;
301-
302- class MyObj
303- {
304- /**
305- * @Groups({"group1", "group2"})
306- */
307- public $foo;
308-
309- /**
310- * @Groups({"group4"})
311- */
312- public $anotherProperty;
313-
314- /**
315- * @Groups("group3")
316- */
317- public function getBar() // is* methods are also supported
318- {
319- return $this->bar;
320- }
321-
322- // ...
323- }
324-
325296 .. code-block :: php-attributes
326297
327298 namespace Acme;
@@ -467,22 +438,6 @@ Option 1: Using ``@Ignore`` Annotation
467438
468439.. configuration-block ::
469440
470- .. code-block :: php-annotations
471-
472- namespace App\Model;
473-
474- use Symfony\Component\Serializer\Annotation\Ignore;
475-
476- class MyClass
477- {
478- public $foo;
479-
480- /**
481- * @Ignore()
482- */
483- public $bar;
484- }
485-
486441 .. code-block :: php-attributes
487442
488443 namespace App\Model;
@@ -697,27 +652,6 @@ defines a ``Person`` entity with a ``firstName`` property:
697652
698653.. configuration-block ::
699654
700- .. code-block :: php-annotations
701-
702- namespace App\Entity;
703-
704- use Symfony\Component\Serializer\Annotation\SerializedName;
705-
706- class Person
707- {
708- /**
709- * @SerializedName("customer_name")
710- */
711- private $firstName;
712-
713- public function __construct($firstName)
714- {
715- $this->firstName = $firstName;
716- }
717-
718- // ...
719- }
720-
721655 .. code-block :: php-attributes
722656
723657 namespace App\Entity;
@@ -1412,22 +1346,6 @@ Here, we set it to 2 for the ``$child`` property:
14121346
14131347.. configuration-block ::
14141348
1415- .. code-block :: php-annotations
1416-
1417- namespace Acme;
1418-
1419- use Symfony\Component\Serializer\Annotation\MaxDepth;
1420-
1421- class MyObj
1422- {
1423- /**
1424- * @MaxDepth(2)
1425- */
1426- public $child;
1427-
1428- // ...
1429- }
1430-
14311349 .. code-block :: php-attributes
14321350
14331351 namespace Acme;
@@ -1501,9 +1419,7 @@ having unique identifiers::
15011419 {
15021420 public $id;
15031421
1504- /**
1505- * @MaxDepth(1)
1506- */
1422+ #[MaxDepth(1)]
15071423 public $child;
15081424 }
15091425
@@ -1735,23 +1651,6 @@ and ``BitBucketCodeRepository`` classes:
17351651
17361652.. configuration-block ::
17371653
1738- .. code-block :: php-annotations
1739-
1740- namespace App;
1741-
1742- use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
1743-
1744- /**
1745- * @DiscriminatorMap(typeProperty="type", mapping={
1746- * "github"="App\GitHubCodeRepository",
1747- * "bitbucket"="App\BitBucketCodeRepository"
1748- * })
1749- */
1750- abstract class CodeRepository
1751- {
1752- // ...
1753- }
1754-
17551654 .. code-block :: php-attributes
17561655
17571656 namespace App;
0 commit comments