dmr/dmr-bundle) is a thin wrapper for the DMR (Doctrine Mapping Reader) library, which enables custom mapping configurations (YAML/XML/Annotations) for Doctrine 2.3+ in Symfony. Its niche focus—extending Doctrine’s mapping system—restricts its applicability to projects requiring dynamic or runtime schema modifications (e.g., plugin-based systems, multi-tenant configurations, or runtime-generated entities).ContainerAware, Kernel events).0.1.*-dev) with no stable version. May introduce breaking changes.doctrine/dbal, doctrine/orm).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Archived/Unmaintained | High | Fork and maintain; evaluate if core DMR library is actively used elsewhere. |
| Symfony Lock-in | High | Assess if Symfony’s bundle system is critical; if not, build a custom Laravel wrapper. |
| Doctrine Version Mismatch | Medium | Test compatibility with Laravel’s Doctrine versions (e.g., doctrine/orm:^2.11). |
| No Stable Release | Medium | Pin to a specific dev commit; monitor for updates. |
| Limited Documentation | Low | Rely on upstream DMR docs and reverse-engineer bundle code. |
Why DMR?
Model::create() with dynamic attributes) cannot?Symfony Dependency
EventDispatcher, Container) that are mandatory for the use case?Alternatives
MappingDriverChain) or Laravel’s Schema::createBlueGreen() suffice?robmorgan/phinx, ocramius/proxy-manager) that offer similar functionality with better Laravel support?Maintenance Plan
dev branch?Performance Impact
Bundle, Kernel) would need replacement.MappingReader and integrate it with Doctrine’s DriverManager.KernelEvents::BOOT) with Laravel’s Service Provider boot methods or Event Listeners.| Step | Symfony Path | Laravel Path |
|---|---|---|
| 1. Dependency Installation | composer require dmr/dmr-bundle:0.1.*-dev |
composer require dmr/dmr:0.1.*@dev (skip bundle) |
| 2. Configuration | Register in AppKernel.php |
Create a custom DMRServiceProvider in config/app.php. |
| 3. Doctrine Integration | Bundle auto-configures DriverManager. |
Manually bind DMR’s MappingReader to Doctrine’s DriverManager in boot(). |
| 4. Runtime Usage | Use bundle services (e.g., dmr.reader). |
Inject DMR service into a custom Doctrine EventSubscriber. |
| 5. Testing | Symfony’s TestCase + Kernel. |
Laravel’s PHPUnit with RefreshDatabase traits. |
doctrine/orm:^2.11).ContainerAware must be replaced with Laravel’s Container or Binding.EventDispatcher → Laravel’s Event facade.Bundle, Kernel).ServiceProvider, Illuminate\Contracts\Container).laravel-doctrine/orm).php artisan migrate).DriverManager).vendor/package/dmr-laravel).| Scenario | Impact | Mitigation |
|---|---|---|
| **DMR |
How can I help you explore Laravel packages today?