- What does manasbala/doctrine-log-bundle do?
- It is a Symfony bundle that adds configurable logging around Doctrine ORM persistence events. It listens for create, update, and delete activity, produces audit-friendly output, and integrates with PSR-3 loggers such as Monolog. The bundle is designed for Symfony service wiring rather than Laravel's Eloquent model events.
- Does manasbala/doctrine-log-bundle work with Laravel?
- No, not as a native Laravel package. It is a Symfony bundle built around Doctrine ORM listeners and Symfony kernel integration, so Laravel's default Eloquent events will not trigger it. Using it in Laravel requires adding Doctrine ORM and manually wiring the listener outside the bundle layer.
- Can I use this package in Laravel with laravel-doctrine/orm?
- Yes, that is the only realistic adoption path if you keep the package intact. You would install Doctrine ORM via laravel-doctrine/orm, then register this package's Doctrine event listener with the EntityManager's EventManager from a service provider. This imports a second ORM alongside Eloquent and adds significant architectural overhead for an audit-log feature.
- How do I install manasbala/doctrine-log-bundle?
- Install it with Composer using composer require manasbala/doctrine-log-bundle. In Symfony, enable the bundle in your kernel or bundles configuration and provide the required service and logging configuration. Laravel applications do not have an equivalent automatic bundle registration step.
- How is the bundle configured?
- Configuration follows the Symfony bundle pattern: a bundle class, dependency-injection extension, and service definitions typically in YAML or XML. You configure the PSR-3 logger and Doctrine event-listener wiring through the Symfony container. There is no Laravel-style config file or service provider published by the package.
- Which Laravel versions are supported?
- None are officially supported. The package targets Symfony and Doctrine ORM, not Laravel's Eloquent ORM, so Laravel version compatibility is not part of its support matrix. Any Laravel use is a custom integration and would need its own compatibility testing.
- Does it support Doctrine ORM 3.x and PHP 8.2+?
- The available assessment notes no compatibility work for Doctrine ORM 3.x or DBAL 4 and flags PHP and Doctrine version ceilings as an open risk. The 1.0.7 release was a JMSSerializer 4 dependency bump rather than a broad modernization. You should run a compatibility spike on PHP 8.2+ before committing.
- What are the best alternatives for Laravel audit logging?
- For Eloquent, maintained options include owen-it/laravel-auditing and spatie/laravel-activitylog. On the Doctrine side, DoctrineExtensions Loggable is a more established audit-logging choice. These alternatives avoid importing Symfony bundle plumbing into a Laravel application.
- What are the production risks of using this package?
- The main risks are single-maintainer dependency, unclear Doctrine 3.x and DBAL 4 support, and no evidence of production usage. Its JMSSerializer-based payload may store serialized snapshots, which complicates querying and targeted PII redaction. You also need to confirm transaction behavior, association handling, recursion prevention, and bulk DQL update and delete coverage.
- Is manasbala/doctrine-log-bundle actively maintained?
- Maintenance signals are weak. The last functional release appears dated to February 2022, with 1.0.7 being a dependency-compatibility bump for JMSSerializer 4. That shows the repository is still touched but does not provide a security response path or a Doctrine 3.x roadmap.