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.
Architecture fit. Unchanged. innmind/stack-trace remains a framework-agnostic diagnostic primitive that models a stack trace as typed immutable data on top of innmind/immutable, not a Laravel error handler. It still belongs behind Laravel's exception pipeline (custom report() hook, Monolog processor, aggregation job), never in place of it. The release note does not touch the data model or API surface, so the architectural judgement stands.
Integration feasibility. Materially worse than at the previous assessment. Release 5.1.0 removes PHP 8.4 support. Laravel 11/12 run happily on 8.4, and 8.4 is the default on current base images and CI runners — so on any environment that has already moved to 8.4, this package now fails at install time, not runtime. Two consequences worth stating plainly:
Technical risk. Raised from High to High-with-a-blocker.
5.1.0. Anyone using a caret constraint (^5.0) will pull this in on a routine composer update and have their install break or their runtime constraint violated. This is precisely the failure mode the previous assessment warned about, and it has now occurred in the wild — validate for the "pin exactly, no caret" mitigation rather than merely suggesting it.innmind/immutable still arrives alongside for one diagnostic helper.Key questions for the maintainer/spike.
innmind/immutable constraint ceiling, or 8.4 deprecations in the FP primitives), or only missing CI coverage? The answer determines whether 8.4 returns, and when.innmind/immutable major?composer.json constraints across 5.0.0 vs 5.1.0 — PHP upper bound, innmind/immutable range, and any psr/log / illuminate/* interaction.Throwable, getTrace() arrays, or getTraceAsString() text (text parsing is brittle)?getPrevious()) and expose the origin frame as a first-class concept?zend.exception_ignore_args=1 and with truncated string params?eval frames, and green CI on the PHP versions we actually run?Stack fit. Unchanged. Optional observability tooling in the diagnostics layer only: the report() path, a Monolog processor, an internal error-aggregation job. No reference from controllers, middleware, or domain code.
Migration path. The anti-corruption layer is no longer merely prudent — it is the reason this is still discussable at all. Keep App\Support\StackTrace\TraceInspector with our own TraceFrame / OriginFrame / Fingerprint DTOs, an InnmindTraceInspector implementation, and a one-line container binding. No innmind/immutable type may cross that boundary into application code or fixtures.
Compatibility. This is now the first gate, ahead of any code work:
composer why-not for PHP and innmind/immutable against the real lockfile before anything else.composer.json (5.0.0 or 5.1.0, never ^5.0) and commit the lockfile.psr/log or illuminate/* bump as a side effect of the narrower PHP constraint.Context facade and this package coexist in the same report() hook without double-logging.Sequencing. Revised; the decision point moves earlier and gets cheaper.
innmind/immutable ceiling, no plan" is a permanent ceiling.eval, and closure edge cases, write the internal version. Treat the package as a reference implementation.report(), log it alongside existing output; no alerting or user-facing change for two weeks.If, and only if, step 1 clears and step 4 passes, proceed at step 5. On the current evidence the expected path ends at step 4 with an internal implementation and this package retained as documentation.
Maintenance. Assume you own it, and now assume you own a version pin. Zero dependents means no upstream pressure to restore 8.4 or to fix anything else. The single maintainer has already demonstrated a willingness to shed runtime support in a minor release, which is the strongest available signal about future release behaviour. Mitigations: exact pins only, lockfile committed, thin adapter, and a pre-agreed fork-or-replace trigger tightened from the previous "no release in 12 months" to include any PHP minor we run being unsupported for longer than one upgrade cycle — a trigger this release would already have tripped on 8.4.
Support. Unchanged and still thin: no community, no Stack Overflow corpus, no Laravel-adjacent docs. One engineer who has read the source and knows Maybe/Either. Key-person risk on a non-critical feature — acceptable only if documented and paired, and considerably less acceptable when the dependency also caps the platform's PHP version.
Scaling. Unchanged. Cost tracks error rate, not traffic. Two caveats persist: (a) traces with large frame arguments can reach megabytes — enforce zend.exception_ignore_args=1, cap frame count, sample before serialising; (b) fingerprinting every exception during an error storm adds work precisely when the app is already degraded — put a circuit breaker or sampling on the inspector call.
Failure modes.
^5.0 resolves 5.1.0, which excludes 8.4, and composer update fails in CI or on deploy. Mitigate with exact pins and a lockfile diff review on dependency PRs.try/catch, fall back to getTraceAsString().innmind/immutable type errors surfacing only in the reporting path, where tests rarely reach.innmind/immutable major resolving at runtime rather than install time.Ramp-up. Unchanged in effort — 1–2 days for a senior PHP engineer on Sequence/Maybe idioms, half a day to read this package's small source, one further day to designate an owner for the adapter. What has changed is the expected return. The honest TPM position is now firmer than before: do not adopt. Write the ~50-line internal implementation, and keep this package as a reference for edge-case handling. A diagnostics nicety that delivers no new capability in 5.1.0, ships a breaking compatibility removal as a minor version, and carries a zero-star single-maintainer supply chain does not justify a permanent dependency — particularly when the cost of the alternative is two days of engineering.
How can I help you explore Laravel packages today?