symfony/profiler-pack
Symfony Profiler Pack integrates the Symfony Profiler and Web Debug Toolbar into your app, giving detailed request/response insights, performance metrics, logs, and debugging panels. Ideal for local dev and troubleshooting during development.
symfony/profiler-pack is a Symfony Pack, meaning it is designed to integrate seamlessly with Symfony applications (v4.4+). If the Laravel application is Symfony-agnostic, this package may not be directly applicable unless abstracted via a middleware layer or API proxy.dd()/dump()), but this package provides Symfony’s Profiler (a powerful HTTP request profiler with panels for database queries, routes, events, etc.). If the goal is enterprise-grade profiling, this could be a compelling alternative if wrapped appropriately.symfony/http-foundation, symfony/routing). Version conflicts may arise, requiring strict Composer constraints or isolation (e.g., separate PHP processes).APP_DEBUG=true).Why Symfony Profiler?
Integration Strategy
Alternatives
Maintenance
Symfony + Laravel Hybrid:
/_profiler/{token}).symfony/http-kernel).Tooling Compatibility:
composer require symfony/profiler-pack --with-all-dependencies --ignore-platform-reqs
Then resolve conflicts via composer why-not or composer why.profiler.example.com).dd() with Profiler API calls for critical paths.ContainerInterface:
$this->app->singleton(Symfony\Contracts\Service\ContainerInterface::class, function ($app) {
return new Symfony\Bridge\Laravel\Container($app);
});
/_profiler/ routes. Laravel must exclude these from its router or proxy them.Route::get('/_profiler/{token}', [ProfilerController::class, 'show'])->name('profiler');
file, redis) is compatible or switch to Symfony’s session component.$client = new Symfony\Contracts\HttpClient\HttpClient();
$response = $client->request('GET', 'http://symfony-app/_profiler/'. $token);
composer require symfony/profiler-pack:^1.0 --with-dependencies
composer.json to avoid surprises:
"symfony/profiler-pack": "^1.0",
"symfony/http-client": "^5.4"
/_profiler/ routes from Laravel’s log driver).symfony.log, Laravel to laravel.log).How can I help you explore Laravel packages today?