- Is miets/doctrine-behaviors compatible with Laravel?
- It is a Doctrine ORM trait and event-subscriber library, not an Eloquent package. It can only work in a Laravel application that already uses Doctrine through something like laravel-doctrine/orm, and even then its Symfony bundle and DI wiring must be replaced with a Laravel service provider. In a standard Eloquent-based Laravel app there is nothing for its traits or subscribers to attach to.
- How do I install miets/doctrine-behaviors in a Laravel app?
- Install it with Composer and register its Doctrine event subscribers against Doctrine's EventManager. The package does not ship Laravel service provider wiring, so you must wire it yourself if you are using Doctrine on Laravel. Before committing, verify the PHP version floor and the supported Doctrine ORM major version in composer.json.
- Does miets/doctrine-behaviors work with Laravel 11?
- The package has no Laravel version constraint because it targets Doctrine and Symfony rather than Laravel itself. Laravel 11 compatibility depends on whether your app uses laravel-doctrine/orm and whether that integration accepts the package's subscribers unchanged. There is no official Laravel 11 integration or Laravel-side test signal in the package.
- What Doctrine behaviors does miets/doctrine-behaviors include?
- It provides reusable traits and event subscribers for behaviors such as Timestampable, Blameable, Sluggable, SoftDeletable, Translatable, Tree, Loggable, and Uuidable. These attach to Doctrine entities and are activated through Doctrine's event system. They are not Eloquent traits and do not operate on Eloquent models.
- What are the Eloquent alternatives to doctrine-behaviors?
- Laravel already provides native timestamps and SoftDeletes, and the community has maintained equivalents such as spatie/laravel-sluggable for slugs, astrotomic/laravel-translatable for translations, spatie/laravel-activitylog for blame and audit logging, and kalnoy/nestedset for trees. These are first-class Eloquent packages with active Laravel adoption. Reaching parity with Eloquent usually means not introducing Doctrine at all.
- Is miets/doctrine-behaviors actively maintained?
- The available signals point to a personal fork: 2 stars, 0 dependents, a single release dated 2024-02-07, and no visible CI or coverage signal. It appears to modernize the DoctrineBehaviors lineage for Symfony 7 and 6.4. Treat maintenance risk as high and check the divergence from upstream before relying on it in production.
- How is miets/doctrine-behaviors different from KnpLabs/DoctrineBehaviors?
- It is described as a fork of a fork of DoctrineBehaviors, updated to work with Symfony 7 and 6.4 where the official package does not work past Symfony 6.3. The core behavior set is inherited from the upstream DoctrineBehaviors lineage. Review the repository diff to see exactly which compatibility changes were made and whether the traits still depend on Symfony DI components.
- Can I use miets/doctrine-behaviors without Symfony?
- The traits may be framework-agnostic, but the package ships Symfony bundle and dependency-injection wiring. The critical question is whether the traits hard-depend on symfony/config, symfony/dependency-injection, or symfony/http-kernel at runtime. If they do, you would need to reproduce or bypass that wiring in Laravel.
- Does miets/doctrine-behaviors support Doctrine ORM 3?
- Doctrine ORM 2.x versus 3.x support is not confirmed by the provided context and is explicitly listed as a constraint to verify. Symfony 7 compatibility suggests a modern PHP floor, likely 8.2 or newer, but that does not guarantee ORM 3 support. Check composer.json and test the package against your actual Doctrine ORM version before adopting it.
- How do I test miets/doctrine-behaviors in a Laravel app before adopting it?
- Set up a throwaway Laravel app with laravel-doctrine/orm, register the package's subscribers against Doctrine's EventManager, and map a test entity using the traits you need. Verify attribute-based mapping versus annotation-based mapping if you have legacy entities. Because the package has no Laravel test suite, you own the integration coverage, so keep the evaluation time-boxed and abandon it if the app is Eloquent-first.