Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Doctrine Orm Bridge

Doctrine Orm Bridge Laravel Package

bengor-user/doctrine-orm-bridge

Doctrine ORM bridge for BenGorUser: adapters and persistence integration to make the User model compatible with Doctrine ORM. Install via Composer and run the fully tested PHPSpec suite; documentation lives in the main User library docs.

View on GitHub
Deep Wiki
Context7

Adapter to make User compatible with Doctrine

Frequently asked questions about Doctrine Orm Bridge
Why would I use Doctrine ORM in Laravel instead of Eloquent?
This bridge is primarily useful if your Laravel project already relies on Doctrine ORM (e.g., for legacy systems or complex DDD patterns) and needs to integrate BenGorUser’s User model. Eloquent is Laravel’s native ORM and is optimized for simplicity and performance, so switching to Doctrine introduces unnecessary complexity unless you have specific requirements like advanced caching or inheritance.
Does this package support Laravel 8/9/10 or only older versions?
The package was last updated in 2017 and requires PHP 5.5, meaning it lacks compatibility with modern Laravel versions (8+) and PHP 8+. If you’re using newer Laravel, this bridge may not work without significant modifications, and you’d risk breaking dependencies or security updates.
How do I install and configure this bridge in Laravel?
Install via Composer with `composer require bengor-user/doctrine-orm-bridge`. Configuration requires replacing Laravel’s default Auth service provider and User model with Doctrine equivalents, which may conflict with Laravel’s Eloquent-based authentication system. Documentation is sparse, so expect manual adjustments for service provider bindings and middleware overrides.
Will this break Laravel’s built-in authentication (e.g., Sanctum, Breeze)?
Yes, this package forces Doctrine ORM into Laravel’s authentication stack, which is hardcoded to Eloquent. You’d need to rewrite middleware (e.g., `Authenticate`, `Authorize`), guards, and potentially third-party packages like Sanctum or Passport. This introduces high technical debt and isn’t recommended unless absolutely necessary.
Are there alternatives to Doctrine ORM for custom User model behavior in Laravel?
For most Laravel projects, extending Eloquent with traits, accessors, or custom query scopes is simpler and more maintainable. If you need Doctrine-specific features (e.g., DDD), consider using it only for non-User entities while keeping Eloquent for authentication. Alternatives like custom Eloquent models or repository patterns avoid ORM conflicts entirely.
How well-tested is this package for Laravel integrations?
The package is tested with PHPSpec, but those tests focus on Doctrine ORM compatibility rather than Laravel-specific integrations (e.g., Eloquent events, query builders). Since it’s abandoned and lacks Laravel ecosystem testing, edge cases like middleware conflicts or service container issues may arise in production.
Can I use this bridge in a greenfield Laravel project?
No, this bridge is not suitable for new Laravel projects. It assumes Doctrine ORM is already in use and introduces unnecessary complexity. Laravel’s default stack (Eloquent + Auth) is optimized for performance and convention. For greenfield projects, stick with Eloquent or evaluate modern alternatives before adopting Doctrine.
What are the performance implications of using Doctrine ORM in Laravel?
Doctrine ORM is generally heavier than Eloquent, especially for simple CRUD operations. If your project doesn’t leverage Doctrine’s advanced features (e.g., second-level caching, complex inheritance), the performance overhead may not justify the switch. Benchmark thoroughly before adoption.
How do I handle database schema differences between Eloquent and Doctrine?
The bridge assumes a specific User entity structure compatible with Doctrine. If your Laravel project uses custom column names, relationships, or Eloquent-specific features (e.g., timestamps, soft deletes), you’ll need to manually map these to Doctrine’s expectations. This adds complexity and may require custom entity listeners or hydration logic.
Is this package actively maintained or should I avoid it?
The package is abandoned (last release in 2017) with no stars or dependents, indicating low community trust. PHP 8+ and Laravel 8+ support are nonexistent, and security updates are unlikely. For production use, weigh the risks of technical debt against the benefits—modern alternatives or custom solutions are far safer choices.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views