martinkup/symfony-profiler-optimization-advisor-bundle
A Symfony bundle that analyzes profiler data and delivers actionable optimization advice. It highlights performance bottlenecks and suggests practical fixes, helping developers speed up their applications and make better use of Symfony’s profiling tools.
Release delta (0.1.0 → 0.1.1). Patch release, no breaking changes; the original evaluation stands in direction. Four signals do move the assessment, though, and one of them sharpens an open question rather than closing it:
Fix AI Mate profiler model accessor usage — confirms an AI Mate integration is a first-class part of the bundle, and that it broke against a profiler model API change in a patch-level release. That is evidence of coupling to profiler internals, and evidence that the AI path is code, not just documentation.enable php-http/discovery — an HTTP-client auto-discovery composer plugin now ships in the dependency graph. This is the first concrete signal that the package may reach a model provider over HTTP. The data-egress question is now more urgent, not resolved.fix security CI/CD — a CI pipeline exists and is being hardened. Partial answer to the maturity/CI-matrix question; the support matrix itself is still undocumented.Architecture fit. The package is a Symfony bundle, not a Laravel package — this must be resolved before any evaluation proceeds. It sits as a meta-collector in the Symfony Web Profiler: it does not instrument code itself, it reads from the Doctrine, Cache, Twig, Events, HttpClient, Messenger and Stopwatch collectors that Symfony already populates per request, then classifies the output into ~15 anti-pattern categories (N+1, slow SQL, cache misses, hot templates, etc.) and ranks each finding by impact/effort/confidence/ROI. Architecturally that is the correct shape for this class of tool: passive observer, dev-only, no runtime coupling to application services, no schema changes, no production code path. For a Symfony-based estate it is an additive, zero-migration addition. For a Laravel-based estate it is not usable at all — Laravel's equivalents are Telescope, Clockwork or Debugbar, and the finding model would have to be rebuilt on top of them. The honest TPM read: the valuable, portable asset here is the detection heuristics and scoring rubric, not the bundle wiring. The 0.1.1 "AI Mate" fix slightly weakens the "passive observer" framing — the AI-assisted path is an active integration with its own dependency and API surface, and it should be treated as a separate, riskier capability.
Integration feasibility. Low technical effort, high diligence effort.
composer require --dev plus bundle registration, gated to dev — a spike is a one-engineer afternoon.php-http/discovery in the tree makes the second outcome plausible. That determines whether this is a code-quality tool or a data-egress decision.php-http/discovery is a composer plugin that changes HTTP client/PSR-18 resolution for the whole project, not just this bundle. Enabling it in a host app can alter how unrelated packages resolve their HTTP client. Cheap to check, expensive to discover later.Technical risk.
| Risk | Severity | Note |
|---|---|---|
| Bus factor / abandonment | High | 46 stars, 0 dependents, single maintainer; 0.1.1 adds three contributors incl. @javiereguiluz, which softens but does not remove the risk |
| Prompt content leakage / data egress | High (raised from Medium) | php-http/discovery + a live "AI Mate" model-accessor code path make outbound model calls plausible; generated prompts likely embed literal SQL, parameters and template variables — potential PII leaving the developer machine |
| Symfony/profiler version drift | Medium | Confirmed live: 0.1.1 contains a fix for a profiler model accessor breaking change. Assumes a fast upstream fix cadence on every Symfony bump |
| False positives eroding trust | Medium | Heuristic N+1/cache-miss detection is noisy; one bad sprint of "fix this" tickets kills adoption |
| Profiler data serialization | Low–Medium | Collectors must store only scalars/arrays/Data; a bundle bug here corrupts profiles and blocks debugging entirely |
| Composer plugin side effects | Low–Medium | Enabling php-http/discovery affects project-wide HTTP client resolution, not just this bundle |
| Prod leakage | Low | Modern Symfony registers bundles env-agnostically; the guarantee rests entirely on the when@dev service tag being correct |
| Maturity signal | Low | 0.1.1 confirms active CI work, still 0.1.x with no published support matrix; verify tag history before pinning |
Key questions for the maintainer.
php-http/discovery required for the AI path, and is "AI Mate" optional or on by default? Can the advisor run fully offline?Stack fit. Hard constraint first: assume Symfony 6.4/7.x on PHP 8.2+ for a viable pilot. If the target estate is Laravel, mark this no-go as a dependency and instead evaluate it as a reference design — port the scoring rubric onto Telescope/Clockwork data, which is a multi-week build, not a composer require. If any services are Symfony-based (common in mixed PHP estates), scope the pilot narrowly to those.
Migration path. None required — the bundle is additive and dev-scoped. The migration is organisational: teams need a place to put "ROI-ranked performance findings" that is not the backlog graveyard. Recommend pairing adoption with an existing performance budget or a per-sprint "profiler review" ritual, otherwise the panel is looked at twice and abandoned.
Compatibility checks before install.
composer.json constraints directly rather than trusting the README. Note that 0.1.1 required a fix for a profiler model accessor — treat every Symfony minor bump as a potential break and re-test.dev-only registration in config/bundles.php and config/services.yaml under when@dev:; verify with a prod container compile that no collector service is tagged.framework.profiler.collect, only_exceptions, storage size) — a chattier panel increases serialized profile size per request.php-http/discovery against the app's existing PSR-18/PSR-17 resolution, and run the spike with outbound network blocked to prove the advisor degrades gracefully rather than hanging or erroring.Sequencing.
dev only, network egress blocked. Capture the raw findings list and manually triage the top 20 for true/false positive ratio.Maintenance. Near-zero production maintenance by design — it must never run outside dev. The real cost is version pinning: treat it as a pinned dev dependency with a named owner and a quarterly review against the Symfony upgrade cadence. 0.1.1 confirms this is the live break point rather than a theoretical one — a profiler-internal accessor change required a release. Budget a low-probability fork cost: with 0 dependents and effectively one maintainer, assume you may need to vendor the scoring logic within 12–18 months. The three first-time contributors in 0.1.1 slightly improve the odds of a fork finding a taker.
Support. Community-only, no SLA, small user base. Escalation path is the issue tracker and then the source. Mitigate by keeping the spike branch reproducible and documenting the exact version + Symfony combination that works, so a break is diagnosable in hours rather than days. The 0.1.1 security/CI work is a mild positive on responsiveness; the 0.1.1 AI-accessor fix is a reminder that the AI path will break independently of the core panel, so keep the two separable in configuration.
Scaling. Per-request overhead is bounded by the upstream collectors, which teams already run in dev; the advisor adds aggregation and scoring, not new instrumentation. At the team level the scaling constraint is human: a single request can surface dozens of findings, and without an ROI-based triage convention the output becomes noise. The 100-profile / ~10MB default profiler storage limit means a few heavy profiles can evict history — plan to tune storage or export findings if the team relies on trend comparison. If the AI path is retained in the pilot, it also adds a per-request or per-review external latency and a provider dependency inside the dev loop.
Failure modes.
collect() degrades debugging for every developer simultaneously; the tool becomes the problem it was meant to find.php-http/discovery alters HTTP client resolution project-wide; a host app's unrelated integration could change behaviour.when@dev tag is ever misconfigured, you ship overhead and a debugging surface to production — verify in CI with a container-compile assertion.Ramp-up. Low for anyone who already reads the Symfony profiler: roughly half a day to interpret the panel and score meanings, plus a short written convention on how findings become tickets (threshold for "act now" vs "backlog" vs "ignore"). The AI-prompt feature raises ramp-up slightly because it requires an agreed policy on which agents may be used and what may be included in a prompt — and 0.1.1 makes clear that decision now has a technical dimension (which HTTP client, which provider, on or off). Non-Symfony developers get no value from this at all — do not roll it out estate-wide where the estate isn't Symfony.
TPM recommendation. Unchanged in shape, tightened in one place. Proceed to a time-boxed, single-app, dev-only spike with an explicit go/no-go gate on the true-positive ratio, contingent on confirming (a) it is genuinely Symfony-only and the target services are Symfony, and (b) the AI path is local-only or can be fully disabled — with php-http/discovery now in the dependency graph, (b) must be verified from source, not from the README. 0.1.1 is a net-positive release for credibility (CI hardening, external contributors, active maintenance) and neutral for product risk (patch-level, no new user-facing features beyond template styling). Do not adopt as a standard until the false-positive rate is measured — with 46 stars, 0 dependents and one maintainer, the bundle's scoring quality is the entire bet, and it is still unvalidated by any third party.
How can I help you explore Laravel packages today?