diff --git a/src/Admin/src/Entity/Admin.php b/src/Admin/src/Entity/Admin.php index ca7726a6..e028ca8a 100644 --- a/src/Admin/src/Entity/Admin.php +++ b/src/Admin/src/Entity/Admin.php @@ -15,7 +15,6 @@ #[ORM\Entity(repositoryClass: AdminRepository::class)] #[ORM\Table(name: "admin")] -#[ORM\HasLifecycleCallbacks] #[ORM\Cache(usage: "NONSTRICT_READ_WRITE")] class Admin extends AbstractEntity implements AdminInterface { diff --git a/src/Admin/src/Entity/AdminLogin.php b/src/Admin/src/Entity/AdminLogin.php index 77f0e62f..759de685 100644 --- a/src/Admin/src/Entity/AdminLogin.php +++ b/src/Admin/src/Entity/AdminLogin.php @@ -10,7 +10,6 @@ #[ORM\Entity(repositoryClass: AdminLoginRepository::class)] #[ORM\Table(name: 'admin_login')] -#[ORM\HasLifecycleCallbacks] #[ORM\Cache(usage: "NONSTRICT_READ_WRITE")] class AdminLogin extends AbstractEntity { diff --git a/src/Admin/src/Entity/AdminRole.php b/src/Admin/src/Entity/AdminRole.php index aa50e6fb..4ce1024e 100644 --- a/src/Admin/src/Entity/AdminRole.php +++ b/src/Admin/src/Entity/AdminRole.php @@ -10,7 +10,6 @@ #[ORM\Entity(repositoryClass: AdminRoleRepository::class)] #[ORM\Table(name: 'admin_role')] -#[ORM\HasLifecycleCallbacks] #[ORM\Cache(usage: "NONSTRICT_READ_WRITE")] class AdminRole extends AbstractEntity { diff --git a/test/Unit/Admin/Entity/AdminLoginTest.php b/test/Unit/Admin/Entity/AdminLoginTest.php index 6b251651..e57ed126 100644 --- a/test/Unit/Admin/Entity/AdminLoginTest.php +++ b/test/Unit/Admin/Entity/AdminLoginTest.php @@ -6,7 +6,6 @@ use DateTimeInterface; use Doctrine\ORM\Mapping\Entity; -use Doctrine\ORM\Mapping\HasLifecycleCallbacks; use Doctrine\ORM\Mapping\Table; use Frontend\Admin\Entity\AdminLogin; use Frontend\Admin\Repository\AdminLoginRepository; @@ -19,17 +18,14 @@ class AdminLoginTest extends UnitTest { public function testAnnotations(): void { - $reflection = new ReflectionClass(AdminLogin::class); - $entity = $reflection->getAttributes(Entity::class); - $table = $reflection->getAttributes(Table::class); - $hasLifecycleCallbacks = $reflection->getAttributes(HasLifecycleCallbacks::class); + $reflection = new ReflectionClass(AdminLogin::class); + $entity = $reflection->getAttributes(Entity::class); + $table = $reflection->getAttributes(Table::class); $this->assertNotEmpty($entity[0]); $this->assertNotEmpty($table[0]); - $this->assertNotEmpty($hasLifecycleCallbacks[0]); $this->assertInstanceOf(ReflectionAttribute::class, $entity[0]); $this->assertInstanceOf(ReflectionAttribute::class, $table[0]); - $this->assertInstanceOf(ReflectionAttribute::class, $hasLifecycleCallbacks[0]); $entityArguments = $entity[0]->getArguments(); $tableArguments = $table[0]->getArguments(); diff --git a/test/Unit/Admin/Entity/AdminRoleTest.php b/test/Unit/Admin/Entity/AdminRoleTest.php index a50cda99..2b6525b3 100644 --- a/test/Unit/Admin/Entity/AdminRoleTest.php +++ b/test/Unit/Admin/Entity/AdminRoleTest.php @@ -6,7 +6,6 @@ use DateTimeInterface; use Doctrine\ORM\Mapping\Entity; -use Doctrine\ORM\Mapping\HasLifecycleCallbacks; use Doctrine\ORM\Mapping\Table; use Frontend\Admin\Entity\AdminRole; use Frontend\Admin\Repository\AdminRoleRepository; @@ -19,17 +18,14 @@ class AdminRoleTest extends UnitTest { public function testAnnotations(): void { - $reflection = new ReflectionClass(AdminRole::class); - $entity = $reflection->getAttributes(Entity::class); - $table = $reflection->getAttributes(Table::class); - $hasLifecycleCallbacks = $reflection->getAttributes(HasLifecycleCallbacks::class); + $reflection = new ReflectionClass(AdminRole::class); + $entity = $reflection->getAttributes(Entity::class); + $table = $reflection->getAttributes(Table::class); $this->assertNotEmpty($entity[0]); $this->assertNotEmpty($table[0]); - $this->assertNotEmpty($hasLifecycleCallbacks[0]); $this->assertInstanceOf(ReflectionAttribute::class, $entity[0]); $this->assertInstanceOf(ReflectionAttribute::class, $table[0]); - $this->assertInstanceOf(ReflectionAttribute::class, $hasLifecycleCallbacks[0]); $entityArguments = $entity[0]->getArguments(); $tableArguments = $table[0]->getArguments(); diff --git a/test/Unit/Admin/Entity/AdminTest.php b/test/Unit/Admin/Entity/AdminTest.php index 39434554..0b86cbc1 100644 --- a/test/Unit/Admin/Entity/AdminTest.php +++ b/test/Unit/Admin/Entity/AdminTest.php @@ -7,7 +7,6 @@ use DateTimeInterface; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping\Entity; -use Doctrine\ORM\Mapping\HasLifecycleCallbacks; use Doctrine\ORM\Mapping\Table; use Frontend\Admin\Entity\Admin; use Frontend\Admin\Entity\AdminRole; @@ -39,17 +38,14 @@ protected function setUp(): void public function testAnnotations(): void { - $reflection = new ReflectionClass(Admin::class); - $entity = $reflection->getAttributes(Entity::class); - $table = $reflection->getAttributes(Table::class); - $hasLifecycleCallbacks = $reflection->getAttributes(HasLifecycleCallbacks::class); + $reflection = new ReflectionClass(Admin::class); + $entity = $reflection->getAttributes(Entity::class); + $table = $reflection->getAttributes(Table::class); $this->assertNotEmpty($entity[0]); $this->assertNotEmpty($table[0]); - $this->assertNotEmpty($hasLifecycleCallbacks[0]); $this->assertInstanceOf(ReflectionAttribute::class, $entity[0]); $this->assertInstanceOf(ReflectionAttribute::class, $table[0]); - $this->assertInstanceOf(ReflectionAttribute::class, $hasLifecycleCallbacks[0]); $entityArguments = $entity[0]->getArguments(); $tableArguments = $table[0]->getArguments();