php-debugbar/doctrine-bridge
Doctrine Bridge for PHP Debug Bar adds collectors to profile Doctrine ORM/DBAL activity in the PHP Debug Bar. Install via Composer, run the included demo with a local DB, and execute PHPUnit/Panther tests for verification.
Install via Composer: composer require --dev php-debugbar/doctrine-bridge. Then ensure php-debugbar/php-debugbar is already installed and configured (e.g., via Laravel’s built-in Debugbar support or manually for Symfony/standalone). In your Doctrine setup, attach the bridge’s QueryCollector to the Configuration object using addFilter() — typically in your config/packages/doctrine.php (Laravel) or service definition (Symfony). The first HTTP request will automatically populate the “Queries” panel in Debug Bar, showing recent DBAL/ORM operations with timing and SQL.
Connection and EntityManager lifecycle. Simply instantiate your EntityManager after loading the bridge; all queries via it will be captured.APP_DEBUG=true). Avoid production部署.Collector classes and adding them to the DebugBar instance manually.laravel-doctrine often handles this automatically, but for vanilla Doctrine setup in Laravel, add a ServiceProvider that binds the bridge collector after Doctrine’s setup.conn1 via connection vs default), verify the correct connection is passed to the bridge; misconfigured lazy setups can cause silent query loss.setCollectQuery on individual connections to reduce noise in complex multi-DB setups.DoctrineCollector and override getMetadata() to inject synthetic panels — useful for detecting hydration bottlenecks in complex result sets.How can I help you explore Laravel packages today?