diff --git a/src/Symfony/Bridge/Doctrine/Tests/DoctrineTestHelper.php b/src/Symfony/Bridge/Doctrine/Tests/DoctrineTestHelper.php index 2cbf416a67b2..9f213c2c9aa5 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineTestHelper.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineTestHelper.php @@ -11,13 +11,11 @@ namespace Symfony\Bridge\Doctrine\Tests; -use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\EventManager; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\ORM\Configuration; use Doctrine\ORM\EntityManager; -use Doctrine\ORM\Mapping\Driver\AnnotationDriver; use Doctrine\ORM\Mapping\Driver\AttributeDriver; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\ORM\ORMSetup; @@ -64,11 +62,7 @@ public static function createTestConfiguration(): Configuration $config->setAutoGenerateProxyClasses(true); $config->setProxyDir(sys_get_temp_dir()); $config->setProxyNamespace('SymfonyTests\Doctrine'); - if (class_exists(AttributeDriver::class)) { - $config->setMetadataDriverImpl(new AttributeDriver([__DIR__.'/../Tests/Fixtures' => 'Symfony\Bridge\Doctrine\Tests\Fixtures'], true)); - } else { - $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), null, true)); - } + $config->setMetadataDriverImpl(new AttributeDriver([__DIR__.'/../Tests/Fixtures' => 'Symfony\Bridge\Doctrine\Tests\Fixtures'], true)); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php index 94be71ec9f15..65ef0e882c27 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php @@ -13,35 +13,22 @@ use Doctrine\ORM\Mapping as ORM; -/** - * @ORM\Entity - */ #[ORM\Entity] class AssociationEntity { /** * @var int - * @ORM\Id @ORM\GeneratedValue - * @ORM\Column(type="integer") */ #[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')] private $id; /** - * @ORM\ManyToOne(targetEntity="SingleIntIdEntity") - * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity */ #[ORM\ManyToOne(targetEntity: SingleIntIdEntity::class)] public $single; /** - * @ORM\ManyToOne(targetEntity="CompositeIntIdEntity") - * @ORM\JoinColumns({ - * @ORM\JoinColumn(name="composite_id1", referencedColumnName="id1"), - * @ORM\JoinColumn(name="composite_id2", referencedColumnName="id2") - * }) - * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity */ #[ORM\ManyToOne(targetEntity: CompositeIntIdEntity::class)] diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php index df4894e76ecb..b74ca502eef8 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php @@ -13,35 +13,22 @@ use Doctrine\ORM\Mapping as ORM; -/** - * @ORM\Entity - */ #[ORM\Entity] class AssociationEntity2 { /** * @var int - * @ORM\Id @ORM\GeneratedValue - * @ORM\Column(type="integer") */ #[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')] private $id; /** - * @ORM\ManyToOne(targetEntity="SingleIntIdNoToStringEntity") - * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity */ #[ORM\ManyToOne(targetEntity: SingleIntIdNoToStringEntity::class)] public $single; /** - * @ORM\ManyToOne(targetEntity="CompositeIntIdEntity") - * @ORM\JoinColumns({ - * @ORM\JoinColumn(name="composite_id1", referencedColumnName="id1"), - * @ORM\JoinColumn(name="composite_id2", referencedColumnName="id2") - * }) - * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity */ #[ORM\ManyToOne(targetEntity: CompositeIntIdEntity::class)] diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php index 4f3352550649..45868ec5e366 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php @@ -15,17 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** - * @Entity - */ #[Entity] class Person { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php index 0e77dbffc6df..eb88c397c12d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php @@ -15,15 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class Person { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php index ae6fec848d1f..96296394ef73 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php @@ -15,17 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** - * @Entity - */ #[Entity] class Person { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php index bad7402e51c9..c8321920ee9e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php @@ -14,22 +14,15 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; -/** - * @Embeddable - */ #[Embeddable] class Address { - - /** @Column(type="string") */ #[Column(type: 'string')] public $street; - /** @Column(type="string") */ #[Column(type: 'string')] public $zipCode; - /** @Column(type="string") */ #[Column(type: 'string')] public $city; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php index 9ab508e30523..a1887d9abe58 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php @@ -15,17 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** - * @Entity - */ #[Entity] class Person { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php index 40ff64d9488b..bd3d4506d3c3 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php @@ -15,19 +15,15 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class CompositeIntIdEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id1; - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id2; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php index 67f3c4f96c07..50556c6b1c3e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php @@ -15,18 +15,12 @@ /** * an entity that has two objects (class without toString methods) as primary key. - * - * @ORM\Entity */ #[ORM\Entity] class CompositeObjectNoToStringIdEntity { /** * @var SingleIntIdNoToStringEntity - * - * @ORM\Id - * @ORM\ManyToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"persist"}) - * @ORM\JoinColumn(name="object_one_id") */ #[ORM\Id] #[ORM\ManyToOne(targetEntity: SingleIntIdNoToStringEntity::class, cascade: ['persist'])] @@ -35,10 +29,6 @@ class CompositeObjectNoToStringIdEntity /** * @var SingleIntIdNoToStringEntity - * - * @ORM\Id - * @ORM\ManyToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"persist"}) - * @ORM\JoinColumn(name="object_two_id") */ #[ORM\Id] #[ORM\ManyToOne(targetEntity: SingleIntIdNoToStringEntity::class, cascade: ['persist'])] diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php index 95e687f6bfa5..62875248fd29 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php @@ -15,19 +15,15 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class CompositeStringIdEntity { - /** @Id @Column(type="string") */ #[Id, Column(type: 'string')] protected $id1; - /** @Id @Column(type="string") */ #[Id, Column(type: 'string')] protected $id2; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php index 5912ae6b1f9e..adcf303bd21b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php @@ -13,21 +13,12 @@ use Doctrine\ORM\Mapping as ORM; -/** - * @ORM\Embeddable - */ #[ORM\Embeddable] class DoctrineLoaderEmbed { - /** - * @ORM\Column(length=25) - */ #[ORM\Column(length: 25)] public $embeddedMaxLength; - /** - * @ORM\Embedded(class=DoctrineLoaderNestedEmbed::class) - */ #[ORM\Embedded(class: DoctrineLoaderNestedEmbed::class)] public $nestedEmbedded; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php index c32a9ef49d47..f3df788cd67b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php @@ -16,75 +16,41 @@ use Symfony\Component\Validator\Constraints as Assert; /** - * @ORM\Entity - * @UniqueEntity(fields={"alreadyMappedUnique"}) - * * @author Kévin Dunglas */ #[ORM\Entity, UniqueEntity(fields: ["alreadyMappedUnique"])] class DoctrineLoaderEntity extends DoctrineLoaderParentEntity { - /** - * @ORM\Id - * @ORM\Column - */ #[ORM\Id, ORM\Column] public $id; - /** - * @ORM\Column(length=20) - */ #[ORM\Column(length: 20)] public $maxLength; - /** - * @ORM\Column(length=20) - * @Assert\Length(min=5) - */ #[ORM\Column(length: 20), Assert\Length(min: 5)] public $mergedMaxLength; - /** - * @ORM\Column(length=20) - * @Assert\Length(min=1, max=10) - */ #[ORM\Column(length: 20), Assert\Length(min: 1, max: 10)] public $alreadyMappedMaxLength; - /** - * @ORM\Column(unique=true) - */ #[ORM\Column(unique: true)] public $unique; - /** - * @ORM\Column(unique=true) - */ #[ORM\Column(unique: true)] public $alreadyMappedUnique; - /** - * @ORM\Embedded(class=DoctrineLoaderEmbed::class) - */ #[ORM\Embedded(class: DoctrineLoaderEmbed::class)] public $embedded; - /** @ORM\Column(type="text", nullable=true, length=1000) */ #[ORM\Column(type: 'text', nullable: true, length: 1000)] public $textField; - /** @ORM\Id @ORM\Column(type="guid", length=50) */ #[ORM\Id, ORM\Column(type: 'guid', length: 50)] protected $guidField; - /** @ORM\Column(type="simple_array", length=100) */ #[ORM\Column(type: 'simple_array', length: 100)] public $simpleArrayField = []; - /** - * @ORM\Column(length=10) - * @Assert\DisableAutoMapping - */ #[ORM\Column(length: 10), Assert\DisableAutoMapping] public $noAutoMapping; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php index 4ba721145690..718cd36889a3 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php @@ -15,28 +15,15 @@ use Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt; use Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString; -/** - * @ORM\Entity - */ #[ORM\Entity] class DoctrineLoaderEnum { - /** - * @ORM\Id - * @ORM\Column - */ #[ORM\Id, ORM\Column] public $id; - /** - * @ORM\Column(type="string", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString", length=1) - */ #[ORM\Column(type: 'string', enumType: EnumString::class, length: 1)] public $enumString; - /** - * @ORM\Column(type="integer", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") - */ #[ORM\Column(type: 'integer', enumType: EnumInt::class)] public $enumInt; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php index 9d9424f0ece0..e70e8798adab 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php @@ -13,15 +13,9 @@ use Doctrine\ORM\Mapping as ORM; -/** - * @ORM\Embeddable() - */ #[ORM\Embeddable] class DoctrineLoaderNestedEmbed { - /** - * @ORM\Column(length=27) - */ #[ORM\Column(length: 27)] public $nestedEmbeddedMaxLength; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php index 515ec30bc897..15dcb9bde2ed 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php @@ -15,31 +15,17 @@ use Symfony\Component\Validator\Constraints as Assert; /** - * @ORM\Entity - * @Assert\DisableAutoMapping - * * @author Kévin Dunglas */ #[ORM\Entity, Assert\DisableAutoMapping] class DoctrineLoaderNoAutoMappingEntity { - /** - * @ORM\Id - * @ORM\Column - */ #[ORM\Id, ORM\Column] public $id; - /** - * @ORM\Column(length=20, unique=true) - */ #[ORM\Column(length: 20, unique: true)] public $maxLength; - /** - * @Assert\EnableAutoMapping - * @ORM\Column(length=20) - */ #[Assert\EnableAutoMapping, ORM\Column(length: 20)] public $autoMappingExplicitlyEnabled; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php index d7d832e6af23..2a5d6822cfe1 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php @@ -13,21 +13,12 @@ use Doctrine\ORM\Mapping as ORM; -/** - * @ORM\MappedSuperclass - */ #[ORM\MappedSuperclass] class DoctrineLoaderParentEntity { - /** - * @ORM\Column(length=35) - */ #[ORM\Column(length: 35)] public $publicParentMaxLength; - /** - * @ORM\Column(length=30) - */ #[ORM\Column(length: 30)] private $privateParentMaxLength; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php index 2c8ac68ce17c..f039b3a50c40 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php @@ -15,19 +15,15 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class DoubleNameEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name2; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php index 0c37651412ab..614d14e47ffb 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php @@ -15,19 +15,15 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class DoubleNullableNameEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name2; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php index cdc82cf94e34..c32dd141b993 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php @@ -13,17 +13,11 @@ use Doctrine\ORM\Mapping as ORM; -/** - * @ORM\Embeddable - */ #[ORM\Embeddable] class Identifier { /** * @var int - * - * @ORM\Id - * @ORM\Column(type="integer") */ #[ORM\Id, ORM\Column(type: 'integer')] protected $value; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php index c2cec427ad77..581d4b710a6b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php @@ -14,16 +14,11 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Tests\Fixtures\Embeddable\Identifier; -/** - * @ORM\Entity - */ #[ORM\Entity] class EmbeddedIdentifierEntity { /** * @var Embeddable\Identifier - * - * @ORM\Embedded(class="Symfony\Bridge\Doctrine\Tests\Fixtures\Embeddable\Identifier") */ #[ORM\Embedded(class: Identifier::class)] protected $id; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php index b9888adc8bea..b579246fd2db 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php @@ -13,7 +13,6 @@ use Doctrine\ORM\Mapping\Entity; -/** @Entity */ #[Entity] class Employee extends Person { diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php index d803ca2310d8..2a232ae0faed 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php @@ -15,19 +15,15 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class GroupableEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $groupName; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php index d57565959501..80f0fda98478 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php @@ -15,11 +15,9 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class GuidIdEntity { - /** @Id @Column(type="guid") */ #[Id, Column(type: 'guid')] protected $id; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php index 35f3836e0d90..fdac47f70ba1 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php @@ -18,20 +18,12 @@ use Doctrine\ORM\Mapping\Id; use Doctrine\ORM\Mapping\InheritanceType; -/** - * @Entity - * @InheritanceType("SINGLE_TABLE") - * @DiscriminatorColumn(name="discr", type="string") - * @DiscriminatorMap({"person" = "Person", "employee" = "Employee"}) - */ #[Entity, InheritanceType('SINGLE_TABLE'), DiscriminatorColumn(name: 'discr', type: 'string'), DiscriminatorMap(['person' => 'Person', 'employee' => 'Employee'])] class Person { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php index b4a1ede9f0a2..4c068e9108a6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php @@ -16,15 +16,12 @@ use Doctrine\ORM\Mapping\Id; use Doctrine\ORM\Mapping\OneToOne; -/** @Entity */ #[Entity] class SingleAssociationToIntIdEntity { - /** @Id @OneToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"ALL"}) */ #[Id, OneToOne(targetEntity: SingleIntIdNoToStringEntity::class, cascade: ['ALL'])] protected $entity; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php index 94b47da855a3..02bebfec0296 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php @@ -15,19 +15,15 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class SingleIntIdEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name; - /** @Column(type="array", nullable=true) */ #[Column(type: 'array', nullable: true)] public $phoneNumbers = []; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php index 8887c5b5a3d6..e78823b83c75 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php @@ -15,15 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class SingleIntIdNoToStringEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php index 8c774009ba53..1abafbdf34f1 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php @@ -15,15 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class SingleIntIdStringWrapperNameEntity { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id; - /** @Column(type="string_wrapper", nullable=true) */ #[Column(type: 'string_wrapper', nullable: true)] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php index b3e952d9a8b3..192337d72778 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php @@ -16,19 +16,12 @@ use Doctrine\ORM\Mapping\GeneratedValue; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class SingleStringCastableIdEntity { - /** - * @Id - * @Column(type="string") - * @GeneratedValue(strategy="NONE") - */ #[Id, Column(type: 'string'), GeneratedValue(strategy: 'NONE')] protected $id; - /** @Column(type="string", nullable=true) */ #[Column(type: 'string', nullable: true)] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php index ce3a5526a5b1..5e3aee53f94d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php @@ -15,15 +15,12 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class SingleStringIdEntity { - /** @Id @Column(type="string") */ #[Id, Column(type: 'string')] protected $id; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php index 238a08511ebe..e101c0185694 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php @@ -15,11 +15,9 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class UlidIdEntity { - /** @Id @Column(type="ulid") */ #[Id, Column(type: 'ulid')] protected $id; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php index 5604c3337009..44f01849d91b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php @@ -17,19 +17,15 @@ use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\UserInterface; -/** @Entity */ #[Entity] class User implements UserInterface, PasswordAuthenticatedUserInterface { - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id1; - /** @Id @Column(type="integer") */ #[Id, Column(type: 'integer')] protected $id2; - /** @Column(type="string") */ #[Column(type: 'string')] public $name; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php index 60271f7d15ab..84613b615721 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php @@ -15,11 +15,9 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** @Entity */ #[Entity] class UuidIdEntity { - /** @Id @Column(type="uuid") */ #[Id, Column(type: 'uuid')] protected $id; diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php index 902850c5828b..336f72470cfa 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php @@ -19,157 +19,82 @@ use Doctrine\ORM\Mapping\OneToMany; /** - * @Entity - * * @author Kévin Dunglas */ #[Entity] class DoctrineDummy { - /** - * @Id - * @Column(type="smallint") - */ #[Id, Column(type: 'smallint')] public $id; - /** - * @ManyToOne(targetEntity="DoctrineRelation") - */ #[ManyToOne(targetEntity: DoctrineRelation::class)] public $foo; - /** - * @ManyToMany(targetEntity="DoctrineRelation") - */ #[ManyToMany(targetEntity: DoctrineRelation::class)] public $bar; - /** - * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid") - */ #[ManyToMany(targetEntity: DoctrineRelation::class, indexBy: 'rguid')] protected $indexedRguid; - /** - * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid_column") - */ #[ManyToMany(targetEntity: DoctrineRelation::class, indexBy: 'rguid_column')] protected $indexedBar; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="foo", indexBy="foo") - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'foo', indexBy: 'foo')] protected $indexedFoo; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="baz", indexBy="baz_id") - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'baz', indexBy: 'baz_id')] protected $indexedBaz; - /** - * @Column(type="guid") - */ #[Column(type: 'guid')] protected $guid; - /** - * @Column(type="time") - */ #[Column(type: 'time')] private $time; - /** - * @Column(type="time_immutable") - */ #[Column(type: 'time_immutable')] private $timeImmutable; - /** - * @Column(type="dateinterval") - */ #[Column(type: 'dateinterval')] private $dateInterval; - /** - * @Column(type="json_array") - */ #[Column(type: 'json_array')] private $jsonArray; - /** - * @Column(type="simple_array") - */ #[Column(type: 'simple_array')] private $simpleArray; - /** - * @Column(type="float") - */ #[Column(type: 'float')] private $float; - /** - * @Column(type="decimal", precision=10, scale=2) - */ #[Column(type: 'decimal', precision: 10, scale: 2)] private $decimal; - /** - * @Column(type="boolean") - */ #[Column(type: 'boolean')] private $bool; - /** - * @Column(type="binary") - */ #[Column(type: 'binary')] private $binary; - /** - * @Column(type="custom_foo") - */ #[Column(type: 'custom_foo')] private $customFoo; - /** - * @Column(type="bigint") - */ #[Column(type: 'bigint')] private $bigint; public $notMapped; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="dt", indexBy="dt") - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'dt', indexBy: 'dt')] protected $indexedByDt; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="customType", indexBy="customType") - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'customType', indexBy: 'customType')] private $indexedByCustomType; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="buzField", indexBy="buzField") - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'buzField', indexBy: 'buzField')] protected $indexedBuz; - /** - * @Column(type="json", nullable=true) - */ #[Column(type: 'json', nullable: true)] private $json; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="dummyRelation", indexBy="gen_value_col_id", orphanRemoval=true) - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'dummyRelation', indexBy: 'gen_value_col_id', orphanRemoval: true)] protected $dummyGeneratedValueList; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php index 23609fb1827d..d38dc431da3a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php @@ -15,16 +15,11 @@ use Doctrine\ORM\Mapping\Embeddable; /** - * @Embeddable - * * @author Udaltsov Valentin */ #[Embeddable] class DoctrineEmbeddable { - /** - * @Column(type="string") - */ #[Column(type: 'string')] protected $field; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php index edd6b01e9f5c..4a43f154b6a0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php @@ -15,46 +15,24 @@ use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -/** - * @Entity - */ #[Entity] class DoctrineEnum { - /** - * @Id - * @Column(type="smallint") - */ #[Id, Column(type: 'smallint')] public $id; - /** - * @Column(type="string", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString") - */ #[Column(type: 'string', enumType: EnumString::class)] protected $enumString; - /** - * @Column(type="integer", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") - */ #[Column(type: 'integer', enumType: EnumInt::class)] protected $enumInt; - /** - * @Column(type="array", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString") - */ #[Column(type: 'array', enumType: EnumString::class)] protected $enumStringArray; - /** - * @Column(type="simple_array", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") - */ #[Column(type: 'simple_array', enumType: EnumInt::class)] protected $enumIntArray; - /** - * @Column(type="custom_foo", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") - */ #[Column(type: 'custom_foo', enumType: EnumInt::class)] protected $enumCustom; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php index 90fec268506e..b7f74e89b270 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php @@ -19,36 +19,19 @@ /** * @author Kévin Dunglas - * - * @Entity */ #[Entity] class DoctrineGeneratedValue { - /** - * @Id - * @GeneratedValue(strategy="AUTO") - * @Column(type="integer") - */ #[Id, GeneratedValue(strategy: 'AUTO'), Column(type: 'integer')] public $id; - /** - * @Column - */ #[Column] public $foo; - /** - * @var int - * @Column(type="integer", name="gen_value_col_id") - */ #[Column(type: 'integer', name: 'gen_value_col_id')] public $valueId; - /** - * @OneToMany(targetEntity="DoctrineRelation", mappedBy="generatedValueRelation", indexBy="rguid_column", orphanRemoval=true) - */ #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'generatedValueRelation', indexBy: 'rguid_column', orphanRemoval: true)] protected $relationList; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php index 3310f9e0d06a..c171645c6551 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php @@ -18,70 +18,37 @@ use Doctrine\ORM\Mapping\ManyToOne; /** - * @Entity - * * @author Kévin Dunglas */ #[Entity] class DoctrineRelation { - /** - * @Id - * @Column(type="smallint") - */ #[Id, Column(type: 'smallint')] public $id; - /** - * @Column(type="guid", name="rguid_column") - */ #[Column(type: 'guid', name: 'rguid_column')] protected $rguid; - /** - * @Column(type="guid") - * @ManyToOne(targetEntity="DoctrineDummy", inversedBy="indexedFoo") - */ #[Column(type: 'guid')] #[ManyToOne(targetEntity: DoctrineDummy::class, inversedBy: 'indexedFoo')] protected $foo; - /** - * @ManyToOne(targetEntity="DoctrineDummy") - */ #[ManyToOne(targetEntity: DoctrineDummy::class)] protected $baz; - /** - * @Column(type="datetime") - */ #[Column(type: 'datetime')] private $dt; - /** - * @Column(type="foo") - */ #[Column(type: 'foo')] private $customType; - /** - * @Column(type="guid", name="different_than_field") - * @ManyToOne(targetEntity="DoctrineDummy", inversedBy="indexedBuz") - */ #[Column(type: 'guid', name: 'different_than_field')] #[ManyToOne(targetEntity: DoctrineDummy::class, inversedBy: 'indexedBuz')] protected $buzField; - /** - * @ManyToOne(targetEntity="DoctrineDummy", inversedBy="dummyGeneratedValueList") - */ #[ManyToOne(targetEntity: DoctrineDummy::class, inversedBy: 'dummyGeneratedValueList')] private $dummyRelation; - /** - * @ManyToOne(targetEntity="DoctrineGeneratedValue", inversedBy="relationList") - * @JoinColumn(name="gen_value_col_id", referencedColumnName="gen_value_col_id") - */ #[ManyToOne(targetEntity: DoctrineGeneratedValue::class, inversedBy: 'relationList')] #[JoinColumn(name: 'gen_value_col_id', referencedColumnName: 'gen_value_col_id')] private $generatedValueRelation; diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php index 053f8bec0d19..9bbad29a09da 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php @@ -17,23 +17,14 @@ use Doctrine\ORM\Mapping\Id; /** - * @Entity - * * @author Udaltsov Valentin */ #[Entity] class DoctrineWithEmbedded { - /** - * @Id - * @Column(type="smallint") - */ #[Id, Column(type: 'smallint')] public $id; - /** - * @Embedded(class="DoctrineEmbeddable") - */ #[Embedded(class: DoctrineEmbeddable::class)] protected $embedded; }