- Is the Profiler Optimization Advisor a Laravel package or a Symfony bundle?
- It is a Symfony bundle built for the Symfony Web Profiler, not a Laravel package. There is no service provider, facade, or Laravel integration, and Laravel does not use the Symfony Profiler collectors this bundle reads from. On a Laravel codebase the equivalent tools are Laravel Telescope, Clockwork, or Laravel Debugbar. Only the detection heuristics and scoring rubric would port over; the bundle wiring would have to be rebuilt.
- How do I install and register the Symfony Profiler Optimization Advisor?
- Install it as a dev dependency with composer require --dev martinkup/symfony-profiler-optimization-advisor-bundle. Then register the bundle in config/bundles.php for the dev and test environments only, so it never loads in production. Because it is a profiler meta-collector, you also need the standard Symfony profiler enabled in those environments. Total setup is roughly a one-engineer afternoon, mostly spent validating which collectors are already installed.
- Which Symfony versions does this bundle support?
- There is no documented support matrix in the repository, so treat the composer.json constraints as the only authoritative source. Check the required symfony/* version ranges and the minimum PHP version before adding it to an existing project. Because the bundle reads profiler model internals, a patch release has already broken an accessor once, so pinning the version and testing across your supported Symfony versions in CI is strongly advised.
- What kinds of performance problems does it detect?
- It reads what the Doctrine, Cache, Twig, Events, HttpClient, Messenger, and Stopwatch collectors already recorded for a request, then classifies the output into roughly fifteen anti-pattern categories. Typical findings include N+1 query patterns, slow SQL, cache misses, and hot templates. Each finding is ranked by impact, effort, confidence, and ROI, so the highest-leverage fixes surface first instead of raw timings you have to interpret yourself.
- Why am I seeing few or no recommendations in the profiler panel?
- Findings only appear for subsystems whose collectors are actually installed and active. A project without Doctrine, Messenger, or Cache enabled will simply produce fewer findings, which is expected behavior rather than a bug. Install the relevant Symfony collectors and hit a realistic page with real traffic patterns to get useful advice. Coverage will vary between services depending on which components each one uses.
- Does the bundle add overhead or run in production?
- Architecturally it is a passive, dev-only observer: it does not instrument code, does not couple to application services, and adds no production code path or database schema change. You must still gate registration to dev and test in config/bundles.php, because the profiler itself is what drives collection. The one caveat is the AI-assisted path, which is an active integration with its own dependency and API surface and should be treated as a separate, riskier capability.
- Does the bundle send my profiler data to an AI model provider?
- This is the key question to resolve before adopting it. The 0.1.1 release ships an AI Mate integration and pulls php-http/discovery into the dependency graph, which is the first concrete sign the package can reach a model provider over HTTP. It is not documented whether prompts are generated deterministically on your machine or routed to an external API. Confirm data flow first, because it determines whether this is a pure code-quality tool or a data-egress decision.
- What is php-http/discovery and why should I care if it is in the dependency tree?
- php-http/discovery is a Composer plugin that changes how PSR-18 and PSR-7 HTTP clients are auto-discovered and resolved. Enabling it affects client resolution for the whole project, not just this bundle, so unrelated packages may start resolving a different HTTP client than before. It is cheap to check in a staging branch and expensive to discover after a production HTTP regression. Review the plugin allow-list in your root composer.json before committing.
- Can I customize which rules the advisor applies?
- Yes, the advisor ships with configurable rules so you can tune thresholds or register additional checks. That matters because default heuristics are tuned for general Symfony applications and may not match your architecture or data volumes. Expect to spend time calibrating severity thresholds so the panel does not become noise that developers learn to ignore.
- Is the package actively maintained and safe to depend on?
- The project is small: roughly 46 stars, zero dependents, and a single primary maintainer, which is a real bus-factor and abandonment risk. Release 0.1.1 is a patch with no breaking changes and added three first-time contributors, including Javier Eguiluz, which softens but does not remove that risk. It also confirms the bundle is tightly coupled to Symfony profiler internals, since a profiler model API change broke the AI accessor at patch level. A security and CI pipeline now exists and was hardened in 0.1.1, but the supported version matrix remains undocumented, so pin the version and be ready to fork.