symfony/doctrine-bridge
Symfony Doctrine Bridge integrates Doctrine ORM and related libraries with Symfony components, providing seamless wiring for services, repositories, persistence, and tooling. Ideal for projects using Doctrine alongside Symfony’s DI container, validator, and other features.
@Assert\*, UniqueEntity).UserProvider, PersistentToken).kernel.event_dispatcher) replaces Laravel’s service providers/events.EntityRepository.AbstractDoctrineExtension, PersistentToken::getClass(), and auto-mapping in Symfony 8.0+ may require refactoring.UserProvider and PersistentToken support.@Assert\* annotations work natively with Doctrine entities.bind()/singleton().Event::dispatch() with Symfony’s EventDispatcherInterface.| Phase | Action Items | Tools/Strategies | Risk Mitigation |
|---|---|---|---|
| Assessment | Audit Eloquent usage (models, queries, migrations). | Static analysis, query logs. | Document dependencies. |
| Entity Layer | Convert models to Doctrine entities (annotations/YAML/attributes). | Doctrine ORM tools, make:entity. |
Use migration scripts for schema changes. |
| Repository | Replace Eloquent repositories with Doctrine’s EntityRepository. |
Custom base repositories. | Gradual replacement per module. |
| Services | Update services to use Doctrine entities (DI container changes). | Symfony autowiring. | Dependency injection testing. |
| Validation | Migrate @Assert\* annotations from Laravel’s ValidatedRequest to entities. |
Symfony Validator component. | Test all validation rules. |
| Security | Replace Laravel guards/sessions with Symfony’s UserProvider/PersistentToken. |
make:user command, security voters. |
Session migration testing. |
| Forms | Bind Doctrine entities to Symfony forms. | make:form command. |
UI regression testing. |
| Testing | Rewrite tests for Doctrine (e.g., DatabaseTests with Doctrine fixtures). |
PHPUnit, Doctrine extensions. | CI/CD pipeline updates. |
| Deployment | Update Docker/Deploy scripts for Symfony’s config (.env, config/packages). |
Ansible/Terraform. | Blue-green deployment. |
schema_subscriber_check_ table rename) are included.How can I help you explore Laravel packages today?