innmind/stack-trace
A lightweight PHP library for working with stack traces: capture them, inspect individual frames, and render readable traces for debugging and error reporting. Framework-agnostic and simple to drop into existing error handlers.
/vendor frames, extracting file/line/class/function, and normalizing traces so the same exception groups consistently across requests and deploys.report() context. Relevant if the roadmap includes "reduce mean time to diagnosis" as a measurable goal.innmind/immutable-style) in internal tooling, or staying with Laravel-native arrays and Collection? This package is on one side of that line.Evidence caveat for the decision record: 0 stars, 0 dependents, single-maintainer, composite score ~16.6, opportunity score ~48. The opportunity signal says the problem space (trace inspection/grouping) is underserved; it says nothing about this package being the answer. Treat it as a spike candidate, not a foundation.
Release-note caveat (5.1.0): the newest release drops PHP 8.4 support — and it did so in a minor version bump (5.0.0 → 5.1.0), not a major one. Two things follow. First, practical: if our Laravel estate is on 8.4, or if the upgrade to 8.4 / 8.5 is on the 12-month roadmap, this package is now a hard blocker in the error path — the worst possible place to discover an incompatibility, because the fallback is "exceptions get reported badly." Second, signal: removing a supported runtime in a non-major release is a versioning-discipline data point, and it reinforces rather than offsets the zero-adoption risk already noted. The assessment below is unchanged in direction — still a spike, not a foundation — but the compat constraint should be checked before any spike starts, not after.
Consider it when:
TraceInspector interface.composer.json php constraint for the 5.x line (post-5.1.0) rather than trusting the release title, and confirm it matches every runtime we deploy to (web, queue workers, CLI, CI images).Look elsewhere when:
Collection-native and would pay a comprehension tax on immutable functional types in an error path.Adoption criteria if pursued: wrap behind an internal interface; pin the version; add a contract test that feeds real traces from our PHP version(s); confirm behavior on our actual error volume in staging before any production surface. Add to the gate: record the package's php constraint in the decision record, and require that adopting it does not narrow our supported runtime window. Re-check the constraint on every composer update, and prefer an upper-bounded pin over a floating ^5.x so a future support-drop cannot land silently.
For executives (one paragraph): We are evaluating a small, MIT-licensed PHP library that turns an exception's raw stack trace into a structured, inspectable form — the foundation for better error grouping and faster diagnosis in our own tooling. The cost is negligible and there is no vendor commitment, but the package has no measurable adoption (zero dependent projects), and its latest release removed support for a current PHP version in a minor update — which is exactly the kind of surprise we do not want inside our error handler. So I am recommending a short, time-boxed evaluation rather than an adoption, conditional on our PHP version being supported. It is a cheap experiment against a real cost — engineer hours lost to unreadable traces — not a strategic bet, and it is fully reversible because we will isolate it behind our own interface. If the spike does not beat what Laravel's handler plus our existing monitoring already give us, we stop and lose a few days.
For engineering:
This is a parser, not a platform. It gives us a structured trace we can filter, fingerprint, and enrich logs with — and it is ours to shape, with no SDK, no agent, no data leaving our infrastructure. The trade-offs are explicit: it pulls in the maintainer's immutable-collection style, it has one maintainer and no dependents, it does no framework wiring, and as of 5.1.0 it has dropped PHP 8.4 — in a minor release, so read the composer.json constraint before you type composer require. That last point matters more than usual here: this dependency lives in the exception path, so an unsupported-runtime conflict shows up as broken error reporting, not as a build failure we notice on day one. So we adopt it only inside an internal adapter (TraceInspector), with a contract test built from real traces off our production PHP versions, and with the runtime constraint asserted in CI. If it disappoints, or if the maintainer's support matrix drifts away from our runtimes again, the adapter swaps to Ignition's parser or a hand-rolled version in a day. Spike scope: parse, filter vendor frames, fingerprint a trace, emit as structured log context, plus one afternoon confirming the 5.x constraint against our deployed PHP versions. Decision at the end: keep, wrap-thinner, or drop.
How can I help you explore Laravel packages today?