stemble/laravel-doctrine-factory
UserFactory::new()->hasPosts(3)).laravel-doctrine/orm factory lacks."This package lets our backend team use Laravel’s battle-tested factory system for Doctrine entities, cutting test setup time by 30% and reducing onboarding friction for new hires. By standardizing how we generate test data—whether for Eloquent or Doctrine—we’ll ship features faster and catch bugs earlier. It’s a low-risk, high-reward move that aligns with our tech stack and developer productivity goals."
Key Outcomes:
"This solves a pain point for our Doctrine users: they’ve been stuck with a frozen, second-class factory API from laravel-doctrine/orm. This package brings modern Eloquent factory features (states, relationships, sequences) to Doctrine, so our team can write tests like UserFactory::new()->state('admin')->hasPosts(2)—no more reinventing the wheel. It’s a drop-in replacement for anyone familiar with Laravel factories, and the MIT license means no legal blockers."
Engineering Benefits:
"Tired of writing clunky Doctrine factory closures? This package lets you use Eloquent’s clean, expressive factory syntax for Doctrine entities. Need a user with 3 posts? Just do UserFactory::new()->hasPosts(3). Supports states (->state('admin')), sequences, and callbacks—everything you love about Eloquent factories, now for Doctrine. Zero learning curve if you’ve used Laravel’s factories before."
Developer Perks:
has(), for(), hasPosts()—just like Eloquent.->state('admin') or generate sequential IDs.afterMaking/afterCreating for post-processing.How can I help you explore Laravel packages today?