php-debugbar/symfony-bridge
Symfony bridge for PHP Debug Bar. Install via Composer to integrate php-debugbar into Symfony apps, with a ready-to-run demo and PHPUnit test suite (including Panther browser tests) for verifying integration and UI behavior.
Start by installing the base php-debugbar/php-debugbar package (required), then add this bridge:
composer require php-debugbar/php-debugbar php-debugbar/symfony-bridge
Once installed, the bridge automatically registers the PHP Debugbar collector and provider with Symfony’s Service Container — no manual configuration needed for basic usage. The first thing developers will notice is the Debugbar panel appearing in Symfony’s Profiler (if enabled), showing request data, logs, timeline, and more — now integrated via Symfony’s event listener infrastructure.
For immediate exploration, run the included demo:
composer install
composer run demo
# Visit http://localhost:8000/demo/
debugbar() helper (if facade is enabled) and Debugbar::info() usage — the bridge reuses the same API as the core PHP Debugbar package.php_debugbar.collector. Example:
// config/services.yaml
services:
App\DebugBar\QueryCollector:
tags: [ { name: php_debugbar.collector, alias: 'queries' } ]
when@dev) to only enable the debugbar in non-production:
when@dev:
php_debugbar:
enabled: true
config/debugbar.php. Configuration is handled entirely by the core php-debugbar/php-debugbar package (see its docs).ResettableInterface for proper reset between requests in long-running processes (e.g., workers via Symfony Messenger). Ensure custom collectors implement this if state persists across requests.KernelEvents::RESPONSE, ensure they run after debugbar’s collector (priority -1000 or lower). Misordered events may result in missing data (e.g., late exceptions).php-debugbar/php-debugbar — always match versions (e.g., ^1.0 bridge ↔ ^3.0 core). Check composer.lock for compatibility.bin/console cache:clear) and verify the PhpDebugBar\SymfonyBridge\DataCollector\HttpCollector is registered (it should appear in bin/console debug:container --tag=php_debugbar.collector).How can I help you explore Laravel packages today?