lexik/modelo-bundle
Symfony integration for the Modelo library: registers bundle configuration and services so you can use Modelo models and data-access features in a standard Symfony application. Best suited to projects already using Modelo rather than as a standalone ORM.
First, the framework reality: lexik/modelo-bundle is a Symfony bundle built on Doctrine ORM, not a Laravel package. It provides reusable base model classes, model managers, and behaviors (timestamps, blameable) so domain logic stays separate from Doctrine persistence. It has no service provider, no Eloquent integration, no Facade, no config publish tagging, and no package-discovery entry. composer require lexik/modelo-bundle in a Laravel app will pull Symfony and Doctrine components in, but nothing will auto-wire against Laravel's container.
The realistic paths for a Laravel developer:
If you actually have a Symfony app: composer require lexik/modelo-bundle (v1.0.2 pins symfony/* ^7 and needs PHP 8.2+), register Lexik\Bundle\ModeloBundle\ModeloBundle::class => ['all' => true] in config/bundles.php or let Flex do it, then look first at config/packages/lexik_modelo_bundle.yaml and the bundle's manager/base-model classes — the base model is where fields and lifecycle helpers live, and the manager is where find/persist logic lives.
First use case (Symfony side): define a domain model that extends the bundle's base model, give it its fields, and query/persist through a manager rather than through a Doctrine repository. The win is that controller/service code depends on your manager, not on EntityManagerInterface, so persistence stays swappable and boilerplate (createdAt, updatedAt, createdBy) comes for free via behaviors.
First use case (Laravel side): the equivalent is an Eloquent base model plus reusable traits. That's the translation the rest of this document is about.
Pattern translation — this is where a Laravel developer gets real day-to-day value from the package's ideas, even without using it:
App\Models\BaseModel that extends Illuminate\Database\Eloquent\Model and pulls in traits like HasTimestamps (though Eloquent already handles timestamps), Blameable, SoftDeletes. You are not gaining anything from the bundle here — you are gaining a structure.lexik/modelo-bundle for the manager abstraction alone, the same benefit exists with a 40-line BaseRepository in Laravel — and it doesn't drag in Doctrine.creating/updating observers, blameable via a trait using auth()->id()). There is nothing to import.EntityManager. Laravel has no equivalent hook for a bundle like this; any "bridge" you write is a bespoke adapter that reimplements the wiring the bundle was supposed to give you.If your team maintains both Symfony and Laravel services and you genuinely need to run this in the Symfony side while consuming it from a Laravel side: put an interface in front of it. Expose the manager's read/write operations as an HTTP or message boundary; do not try to import the PHP classes into the Laravel app. The Doctrine EntityManager, bundle config, and behavior listeners will not cross the runtime boundary cleanly.
If you must evaluate it for a Symfony service you own: the correct implementation pattern is "manager in the Symfony app, controller depends on manager, entity stays a plain model extending the bundle's base." Keep the base-class inheritance shallow and wrap the manager behind your own interface so a future fork or replacement is contained.
chore(deps) bump that adds Symfony 7 support and nothing else. If a Symfony service in your estate is on 6.4 LTS, this release is available, not urgent, and it should land in the same change window as the Symfony 6→7 upgrade, not before.composer why-not symfony/framework-bundle first — a still-6.x bundle elsewhere in the graph is the most likely near-term failure, and it surfaces as a Composer resolution error, not a runtime bug.How can I help you explore Laravel packages today?