Skip to content

Commit 09324b9

Browse files
authored
fix: remove SerializerGroupsAttributeGenerator (replaced by attributes) (#388)
1 parent 52ca835 commit 09324b9

File tree

7 files changed

+1
-104
lines changed

7 files changed

+1
-104
lines changed

src/AttributeGenerator/SerializerGroupsAttributeGenerator.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/SchemaGeneratorConfiguration.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use ApiPlatform\SchemaGenerator\AttributeGenerator\ConstraintAttributeGenerator;
2020
use ApiPlatform\SchemaGenerator\AttributeGenerator\DoctrineOrmAssociationOverrideAttributeGenerator;
2121
use ApiPlatform\SchemaGenerator\AttributeGenerator\DoctrineOrmAttributeGenerator;
22-
use ApiPlatform\SchemaGenerator\AttributeGenerator\SerializerGroupsAttributeGenerator;
2322
use Symfony\Component\Config\Definition\Builder\NodeBuilder;
2423
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
2524
use Symfony\Component\Config\Definition\ConfigurationInterface;
@@ -266,7 +265,6 @@ public function getConfigTreeBuilder(): TreeBuilder
266265
DoctrineOrmAssociationOverrideAttributeGenerator::class,
267266
ApiPlatformCoreAttributeGenerator::class,
268267
ConstraintAttributeGenerator::class,
269-
SerializerGroupsAttributeGenerator::class,
270268
// Configuration attribute generator needs to be last to merge its attributes with previously generated ones.
271269
ConfigurationAttributeGenerator::class,
272270
])

tests/AttributeGenerator/SerializerGroupAttributeGeneratorTest.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

tests/Command/DumpConfigurationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ interface: null
266266
- ApiPlatform\SchemaGenerator\AttributeGenerator\DoctrineOrmAssociationOverrideAttributeGenerator
267267
- ApiPlatform\SchemaGenerator\AttributeGenerator\ApiPlatformCoreAttributeGenerator
268268
- ApiPlatform\SchemaGenerator\AttributeGenerator\ConstraintAttributeGenerator
269-
- ApiPlatform\SchemaGenerator\AttributeGenerator\SerializerGroupsAttributeGenerator
270269
- ApiPlatform\SchemaGenerator\AttributeGenerator\ConfigurationAttributeGenerator
271270
272271
# Directories for custom generator twig templates

tests/e2e/customized/App/Schema/Entity/Person.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Doctrine\Common\Collections\Collection;
1818
use Doctrine\ORM\Mapping as ORM;
1919
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
20-
use Symfony\Component\Serializer\Annotation\Groups;
2120
use Symfony\Component\Validator\Constraints as Assert;
2221

2322
/**
@@ -69,7 +68,6 @@ class Person extends MyCustomClass implements MyCustomInterface
6968
*/
7069
#[ORM\Column(type: 'text', nullable: true)]
7170
#[ApiProperty(types: ['https://schema.org/additionalName'])]
72-
#[Groups(['extra'])]
7371
private ?string $additionalName = null;
7472

7573
/**

tests/e2e/original/App/Schema/Entity/Person.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Doctrine\Common\Collections\Collection;
1515
use Doctrine\ORM\Mapping as ORM;
1616
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
17-
use Symfony\Component\Serializer\Annotation\Groups;
1817
use Symfony\Component\Validator\Constraints as Assert;
1918

2019
/**
@@ -60,7 +59,6 @@ class Person extends Thing
6059
*/
6160
#[ORM\Column(type: 'text', nullable: true)]
6261
#[ApiProperty(types: ['https://schema.org/additionalName'])]
63-
#[Groups(['extra'])]
6462
private ?string $additionalName = null;
6563

6664
/**

tests/e2e/schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ types:
2626
properties:
2727
familyName: ~
2828
givenName: ~
29-
additionalName: { groups: ['extra'] }
29+
additionalName: ~
3030
gender: { range: https://schema.org/GenderType }
3131
address: { range: https://schema.org/PostalAddress }
3232
birthDate: ~

0 commit comments

Comments
 (0)