diff --git a/tests/Tests/ORM/Functional/Ticket/GH6123Test.php b/tests/Tests/ORM/Functional/Ticket/GH6123Test.php index 7a5f14980f..05a1a765f2 100644 --- a/tests/Tests/ORM/Functional/Ticket/GH6123Test.php +++ b/tests/Tests/ORM/Functional/Ticket/GH6123Test.php @@ -6,7 +6,6 @@ use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; -use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\UnitOfWork; use Doctrine\Tests\OrmFunctionalTestCase; @@ -17,7 +16,7 @@ protected function setUp(): void parent::setUp(); $this->createSchemaForModels( - GH6123Entity::class, + GH6123Entity::class ); } @@ -58,7 +57,7 @@ public function testRemovedEntityCanBePersistedAgain(): void $this->_em->flush(); } - private function loadEntityFromDatabase(int $id): GH6123Entity|null + private function loadEntityFromDatabase(int $id): ?GH6123Entity { return $this->_em->createQueryBuilder() ->select('e') @@ -70,11 +69,20 @@ private function loadEntityFromDatabase(int $id): GH6123Entity|null } } +/** + * @ORM\Entity + */ #[ORM\Entity] class GH6123Entity { + /** + * @ORM\Id + * @ORM\GeneratedValue + * @ORM\Column(type="integer") + * @var int + */ #[ORM\Id] #[ORM\GeneratedValue] - #[Column(type: Types::INTEGER, nullable: false)] - public int $id; + #[ORM\Column(type: Types::INTEGER)] + public $id; }