benkle/doctrine-adoption-bundle
Adopt When:
JOINED, SINGLE_TABLE, or CLASS_TABLE) and struggles with discriminator management.Document types at once).Look Elsewhere If:
"This package lets us model complex hierarchies (like documents, products, or roles) in our database more cleanly—reducing code duplication and making future changes easier. For example, if we’re building a CMS where users upload PDFs, images, and forms, we can define shared fields (like created_at) once in a parent class and avoid repeating them in every child type. It’s a lightweight, MIT-licensed tool that cuts development time for inheritance-heavy features, with minimal risk since it’s just a thin layer over Doctrine. The tradeoff? A tiny upfront effort to integrate it, but long-term savings in maintenance."
*"This bundle adds two key services to Doctrine’s inheritance mapping:
Document::createAs('PDF')).findAllDocuments() returns PDFs, images, etc.).
Why use it?AppKernel.php with zero config for basic use.Call to Action: "Let’s prototype this for our [highest-priority inheritance use case, e.g., product variants] in 2 sprints. If it saves >5 hours/month in query writing, we’ll roll it out."
How can I help you explore Laravel packages today?