sylius-labs/association-hydrator
Doctrine ORM association hydrator for Sylius apps, inspired by Ocramius’ hydration optimization technique. Helps efficiently load and hydrate entity associations to reduce queries and improve performance in read-heavy workflows.
Adopt if:
Look elsewhere if:
For Executives: "This package lets us cut database query load by 30–50% for complex data relationships—without rewriting our backend. Think of it like a ‘turbocharger’ for Doctrine ORM: it automatically optimizes how related data (e.g., product variants, user subscriptions) is loaded, speeding up APIs and reducing cloud costs. For a one-time integration effort, it’s a high-ROI fix for slow pages or scaling pains. Used by Sylius (a leader in e-commerce platforms), it’s battle-tested for high-traffic apps."
For Engineering: *"AssociationHydrator solves N+1 query hell with minimal code changes. Instead of manually writing DTOs or complex QueryBuilder logic, we drop this in and:
Product → Variants → Inventory in 1 query).->with() chains or custom repositories for every nested fetch.
Best for: Legacy apps with messy hydration, or new projects where we want to avoid tech debt. Tradeoff: Adds a small dependency, but the performance gains justify it."*How can I help you explore Laravel packages today?