feat(person): initial Person domain with entity, model and DTO
PHP Unit Tests / test (push) Has been cancelled
PHP Unit Tests / test (push) Has been cancelled
- Add PersonEntity in Data layer with Doctrine ORM attributes - Add PersonModel in Logic layer for business logic - Add immutable PersonDto in Shared layer - Configure doctrine/orm dependency in composer.json - Add Doctrine deprecation triggers to phpunit configuration
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
globs: '["**/Data/**/*Repository.php"]'
|
||||
description: Prevents the common error of using invalid Doctrine ORM attributes
|
||||
in Repository classes
|
||||
---
|
||||
|
||||
When creating Doctrine repositories, NEVER use #[ORM\EntityManager] as this is not a valid Doctrine mapping attribute and causes runtime errors. Repositories must only be instantiated via Dependency Injection with EntityManagerInterface in their constructor. Valid ORM attributes for Repositories include: none (standard), or optionally #[ORM\HasEntityListeners] if needed. Mapping attributes like #[ORM\Entity], #[ORM\Table], #[ORM\JoinColumn] are ONLY for Entity classes, not Repository classes.
|
||||
Reference in New Issue
Block a user