cryonighter/formula-doctrine-bundle
orderCount, totalSpent, lastActivityDate) without physical database columns, reducing schema complexity and storage costs.Customer::getLifetimeValue()) directly in the entity layer, avoiding service-layer boilerplate.Product::getStockStatus(), Order::getTaxTotal().User::getSubscriptionTier(), Project::getActiveTasks().Report::getPeriodicMetrics() without materialized views.GENERATED ALWAYS AS)."This bundle lets us add dynamic, read-only fields to our database models (e.g., ‘order count’ or ‘customer lifetime value’) without extra database columns or slow N+1 queries. It’s like adding computed properties to your entities—cleaner code, faster queries, and no schema changes. Think of it as ‘Google Sheets for your database,’ but built into Symfony. Low risk (MIT license), high reward for analytics and reporting features."
Key Ask: "Can we pilot this for [X high-impact metric] to reduce backend complexity and speed up dashboard development?"
*"The Formula Doctrine Bundle integrates Hibernate-style #[Formula] annotations into Symfony, enabling SQL/DQL-based computed fields in Doctrine entities. Key benefits:
Trade-offs:
Proposal: Use this for [specific use case, e.g., User::getActiveSubscriptionDays()] to replace [current workaround]. Benchmark against alternatives like custom Doctrine listeners."*
Next Steps:
Product::getDiscountedPrice).How can I help you explore Laravel packages today?