- What is wouterj/eloquent-bundle?
- It is a Symfony bundle that wires Laravel's Eloquent ORM into the Symfony service container. It lets a Symfony application use Eloquent's ActiveRecord-style models, queries, relationships, and migrations instead of or alongside Doctrine. The bundle itself is primarily a dependency-injection and configuration bridge, not a new ORM abstraction.
- Is wouterj/eloquent-bundle a Laravel package or a Symfony package?
- Despite being relevant to Laravel developers, it is a Symfony bundle. Its purpose is to bring illuminate/database and Eloquent into Symfony applications, not to add Symfony features to Laravel. Use it when the host application is Symfony and you want Laravel's ORM inside it.
- How do I install wouterj/eloquent-bundle in a Symfony application?
- Install it with Composer using composer require wouterj/eloquent-bundle, then enable the bundle in your Symfony bundle configuration. You also need to configure the database connection and any Eloquent model service mappings. Because the package is a bridge, check its composer constraints and README for the exact bundle class and config keys before wiring it into an existing app.
- Which Symfony and Laravel versions does wouterj/eloquent-bundle support?
- The bundle must be compatible with both a Symfony major and an illuminate/database major, and that intersection is the main compatibility risk. The evaluation does not provide a declared version matrix, so inspect the composer.json constraints and test against your current and next-year Symfony and Laravel targets. Laravel ships annual breaking changes and Symfony has a fixed major cadence, so pin versions and budget for upgrades.
- Can I use Eloquent alongside Doctrine in a Symfony app?
- Yes, mechanically you can run both, but the evaluation flags this as the high-risk scenario. Doctrine and Eloquent have separate identity maps, change tracking, entity metadata, transaction semantics, and migration tooling, and their entities are not shared. Confine Eloquent to a bounded service or repository layer, or avoid mixing both ORMs in the same request path unless you have explicit conventions.
- How do I register Eloquent models as services in Symfony?
- The bundle's value is wiring Eloquent into Symfony's container so models and the connection manager can be registered as services with dependency injection. You typically define model services in Symfony configuration and inject repositories or model factories instead of relying on Laravel facades. Keep facades out of controllers where possible because static calls defeat Symfony's DI introspection and make testing harder.
- How are migrations handled with wouterj/eloquent-bundle?
- Eloquent normally pairs with Laravel's schema builder and migrations, while Symfony teams usually expect Doctrine Migrations. The bundle does not resolve that process choice for you, so decide who owns schema changes before adopting it. Running both migration systems or replacing Doctrine Migrations is a tooling and workflow change, not just a code change.
- Does wouterj/eloquent-bundle support multiple database connections and read/write splitting?
- The bundle wires Eloquent's connection manager, but the evaluation lists multiple connections, read/write splitting, and pooling as questions to verify against your infrastructure. Check the bundle configuration and the underlying illuminate/database capabilities rather than assuming parity with Doctrine. Test nested transactions and connection handling in staging before relying on them in production.
- Is wouterj/eloquent-bundle safe to use in production?
- It can be appropriate for a Symfony app or bounded service with a simple ActiveRecord-shaped model and no existing Doctrine investment. Treat it cautiously in an existing Doctrine codebase because dual ORMs create subtle transaction, data-integrity, and migration risks. The package has weak ecosystem signals, a single-maintainer lineage, and low opportunity score, so plan for ownership, pin versions, and test thoroughly.
- What are the alternatives to wouterj/eloquent-bundle for using Eloquent in Symfony?
- You can use illuminate/database directly through its standalone Capsule setup and write your own small Symfony service wiring. Staying with Doctrine ORM is the lower-risk option for teams already invested in Symfony's entity and migration model. If you adopt the bundle, keep the wiring thin so you can replace it with Capsule or Doctrine if the package is abandoned.