tourze/symfony-command-profile-bundle
A Symfony bundle that profiles console commands, hooking into console events to measure execution time and memory usage and help you spot slow or resource-heavy commands in your application.
composer require tourze/symfony-command-profile-bundle:^0.1. Treat 0.1.0 as the first tagged release worth pinning to; the notes ship only a compare link, so read 0.0.2...0.1.0 on GitHub before adopting.composer.json first: the package targets the Symfony Console/Bundle stack (PHP + symfony/console, symfony/framework-bundle constraints), not Laravel's Illuminate\Console API. Confirm the PHP/Symfony version matrix matches your app before installing.src/ for the bundle class and the console event subscriber/listener, and DependencyInjection/ for the config tree (where the output path, enable flag and format are defined).microtime() calls. Register it env-gated to dev/test only.config/bundles.php guarded by environment, then configure it under its bundle key. Keep it out of prod.ConsoleEvents::COMMAND / ConsoleEvents::TERMINATE (equivalently Illuminate\Console\Events\CommandStarting/CommandFinished). Avoid trying to auto-discover a Symfony bundle in Laravel — there is no bundle registry.$this->app->singleton(Profiler::class, ...), then Event::listen(CommandStarting::class, ...) and stop/flush on CommandFinished. Gate on $this->app->environment('local', 'testing').storage/logs/command-profile.log or a dedicated disk rather than var/ (Symfony default), so artifacts don't collide with Laravel's storage conventions.artisan/console commands the same way query-count assertions do for HTTP.decorates: in Symfony, $this->app->extend() in Laravel) rather than forking it.0.1.*) if you can't absorb churn.KernelInterface, %kernel.debug%, %kernel.project_dir% and bundle config parameters. None of these exist in Laravel; expect to supply them manually or bypass the bundle layer entirely and use only the profiler/subscriber classes.queue:work) — terminate events may not fire as expected, so flush explicitly.php artisan config:clear / cache:clear in Symfony). Stale compiled config is the most common "it's enabled but silent" cause.How can I help you explore Laravel packages today?