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 Compatibility Bundle

Doctrine Compatibility Bundle Laravel Package

alengo/doctrine-compatibility-bundle

View on GitHub
Deep Wiki
Context7

Compatibility fixes for Sulu 3 with Doctrine ORM 3.x and Gedmo DoctrineExtensions

Frequently asked questions about Doctrine Compatibility Bundle
Can I use this bundle to upgrade Doctrine ORM from 2.x to 3.x in a Laravel app without Sulu CMS?
No, this bundle is specifically designed for Sulu 3.x compatibility. If you're not using Sulu, consider alternatives like `laravel-doctrine/orm` or a custom Doctrine 3.x integration. The bundle assumes Sulu’s dependency structure, which may not align with pure Laravel projects.
Does this bundle work with Laravel’s Eloquent ORM, or is it purely for Doctrine?
This bundle is for Doctrine ORM 3.x only and won’t interact with Eloquent. If your app uses Eloquent, you’ll need to maintain both ORMs separately or evaluate a full migration strategy. The bundle assumes a Symfony-like environment, which isn’t natively supported in Laravel.
What Laravel versions are supported by this bundle?
The bundle itself doesn’t enforce Laravel version constraints, but it requires Symfony components (via `spatie/laravel-symfony-support`). Ensure your Laravel version (8.x+) is compatible with the Symfony bridge you’re using. Test thoroughly, as Doctrine 3.x may introduce breaking changes regardless of Laravel version.
How do I install this bundle in a Laravel project?
First, install `spatie/laravel-symfony-support` via Composer, then add this bundle to your `composer.json` under `extra.bundles`. Configure the Symfony bridge in `config/app.php` and override `Kernel.php` to load Symfony bundles. Follow the [SuluDoctrineCompatibilityBundle README](https://github.com/alengodev/SuluDoctrineCompatibilityBundle) for Symfony-specific steps.
Will this bundle break existing Gedmo behaviors like Sluggable or Timestampable?
The bundle aims to support Gedmo DoctrineExtensions, but not all behaviors may be fully compatible. Test all used Gedmo features (e.g., `Sluggable`, `SoftDeleteable`) in a staging environment. If a behavior fails, check the bundle’s [issue tracker](https://github.com/alengodev/SuluDoctrineCompatibilityBundle/issues) or consider alternatives like `spatie/laravel-activitylog` for Laravel-native solutions.
Are there performance overhead concerns when using this compatibility layer?
Compatibility layers can introduce minor overhead due to abstraction. Benchmark critical paths (e.g., entity hydration, query execution) post-integration. If performance is critical, evaluate whether the benefits of Doctrine 3.x upgrades outweigh the trade-offs, or consider a native Laravel Doctrine integration like `laravel-doctrine/orm`.
How do I handle Doctrine-specific tests (e.g., DQL queries) in Laravel’s PHPUnit setup?
Extend your test suite to include Doctrine-specific assertions (e.g., `EntityManager` interactions, query builder results). Use Laravel’s `DatabaseMigrations` or `DatabaseTransactions` traits for Doctrine tests. Mock Symfony services if needed, and validate Gedmo behaviors with custom test cases. Document Doctrine-specific test patterns in your team’s testing guidelines.
What if I encounter breaking changes after upgrading Doctrine with this bundle?
Doctrine ORM 3.x introduces BC breaks (e.g., `EntityManager` API changes). The bundle mitigates some issues, but you may still need to update custom repositories, DQL queries, or event listeners. Refer to the [Doctrine 3.x migration guide](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/migration.html) and the bundle’s [issue tracker](https://github.com/alengodev/SuluDoctrineCompatibilityBundle/issues) for known problems.
Is there a maintenance roadmap for this bundle if Sulu or Doctrine evolves?
The bundle’s maintenance depends on the [AlengoDev team](https://github.com/alengodev) and community contributions. Check the repository’s `README` or `CHANGELOG` for updates. If long-term support is critical, consider forking the bundle or coordinating with the maintainers to align with your project’s timeline. Laravel’s evolving ecosystem may also require periodic adjustments.
What are the alternatives if I don’t want to use Symfony bundles in Laravel?
For Doctrine ORM in Laravel without Symfony, use `laravel-doctrine/orm` (official bridge) or integrate `doctrine/orm` directly with custom Laravel service providers. For Gedmo-like features, explore Laravel-native packages like `cviebrock/eloquent-sluggable` or `spatie/laravel-activitylog`. These avoid Symfony dependencies but may lack Sulu-specific optimizations.
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware