stemble/laravel-doctrine-factory
state(), has(), afterCreating) minimizes learning curves. Teams using Laravel’s testing tools (e.g., Pest, PHPUnit) can reuse existing factory logic with minimal adjustments.@PrePersist, @PostLoad, etc., may conflict with factory callbacks. Testing is needed to ensure afterCreating triggers align with Doctrine events.findBy()) for relationship seeding.SingleTableInheritance) or composite keys may require custom factory logic.recycle()).Doctrine Configuration:
EntityManager or third-party extensions (e.g., Gedmo)?Testing Strategy:
Relationship Complexity:
ManyToMany proxies, custom relationship types, or bidirectional associations? These may need special handling.CI/CD Impact:
Long-Term Viability:
laravel/doctrine) in the future?UserFactory) if used across ORMs.refreshDatabase()).DatabaseSeeder or custom seeders.laravel-doctrine/orm). Verify compatibility with:
EntityManager configurations.StofDoctrineExtensions).Factory::raw()).laravel-doctrine/orm and configure Doctrine if not already present.Doctrine\ORM\Mapping\Entity and use the HasFactory trait.DatabaseSeeder or module-specific seeders.create() calls in tests with DoctrineFactory::new().has()) to work with Doctrine repositories.afterCreating instead of @PostPersist for side effects").state(), for()) are well-documented and community-supported.afterCreating vs. Doctrine events).dd() or Laravel’s tap() to inspect generated entities before persistence.factory(..., 'times' => 1000) sparingly; consider batching.EntityManager cache after bulk operations.pest --parallel.setUp()).has() and `How can I help you explore Laravel packages today?