draw/doctrine-extra
Adds extra helpers and integrations for using Doctrine within Laravel/PHP apps, including convenience utilities to extend Doctrine’s capabilities and streamline configuration and common tasks.
barryvdh/laravel-debugbar or spatie/laravel-query-logger cover similar ground with Laravel-first designs. This package’s value is only for Doctrine-heavy stacks.Log facade). Custom handlers may be needed to bridge gaps.prePersist, postUpdate) may conflict with Laravel’s Eloquent lifecycle.draw/dependency-injection could clash with Laravel’s DI container.Doctrine Justification:
doctrine/orm events) already in use?Laravel Compatibility:
Value Over Alternatives:
laravel-debugbar or spatie/query-logger lack?Operational Trade-offs:
Log facade).laravel-debugbar or spatie/query-logger for debugging.php -v) and Laravel compatibility.composer require --dev draw/doctrine-extra doctrine/orm doctrine/dbal
// config/packages/doctrine.yaml
doctrine:
orm:
entity_listeners:
Draw\DoctrineExtra\Logger\DoctrineExtraLogger: ~
spatie/laravel-query-logger for SQL logging.draw/dependency-injection could override Laravel’s DI bindings. Mitigate by:
# config/services.yaml
services:
Draw\DoctrineExtra\Logger\DoctrineExtraLogger:
bind:
$monologLogger: '@monolog.logger.doctrine'
ext-gd or graphviz CLI tools. Document this in README.md.doctrine_extra logs.prePersist).draw/* packages may introduce untested libraries.composer.json.$logger->setEnabled(app()->environment('local'));
doctrine_extra channel.Log facade.GraphvizLogger fails if graphviz is missing (no graceful fallback).Adopt Only If:
laravel-debugbar) meet the use case.Avoid If:
How can I help you explore Laravel packages today?