php-bug-catcher/bug-catcher-reporter-bundle
Symfony bundle that integrates Bug Catcher error reporting into PHP applications, capturing exceptions and forwarding diagnostic reports to the Bug Catcher service with configurable bundle setup.
Verdict: low-risk patch; adopt after normal staging verification. v2.1.1 fixes a correctness defect in stack-trace capture and adds previous-exception frames. There are no breaking changes, no new configuration keys, and no new services or constructor signature changes.
Architecture fit. The package sits in the Laravel exception-reporting path: BugCatcher::logException(), WriteStackTraceListener, a Monolog handler, ErrorFormater, and CollectCodeFrame. Reports are serialized as Codeframe[] to the Bug Catcher server. v2.1.1 adds ThrowSiteStacktrace, which builds the first Codeframe directly from the Throwable using the vendor parser’s code-window extraction, instead of reconstructing the throw site from getTraceAsString(). It also walks getPrevious() and labels those frames Caused by: .... CollectCodeFrame gains collectThrowableFrames(Throwable), while collectFrames(string) remains as fallback. WriteStackTraceListener always uses the new path; BugCatcherMonologHandler uses it when context['exception'] is a Throwable, otherwise falling back to the formatted string.
Integration feasibility. High. The release is explicitly drop-in: no configuration changes, stack_trace already defaults to true, wire format remains serialize(Codeframe[]), and existing stored records are unaffected because frames are parsed client-side at write time. Only new reports will show the corrected throw site and previous-chain frames. The one cross-team dependency is the matching server-side template change (php-bug-catcher/bug-catcher#19): without it, the extra frames still appear but without the Caused by: label.
Technical risk. Low, with two residual risks. First, version skew: client-first deployment yields unlabeled previous frames until the server template ships; server-first deployment should be harmless. Second, the fallback path still parses a formatted string when context['exception'] is not a Throwable; the greedy regex failure described in the release notes is addressed on the Monolog path, but any remaining string-parsing fallback retains inherent fragility. Previous-chain capture can also increase payload size and may include sensitive data from earlier exception messages or code windows.
Key questions.
Stack fit. Fits standard Laravel applications using Composer and Monolog. The package is expected to be auto-discovered or registered through the existing service provider; no new services or config keys are introduced by v2.1.1.
Migration path. Upgrade via Composer to ^2.1.1, deploy normally, and verify in staging that the first frame now matches the actual throw file and line. No configuration migration is required. Existing reports remain unchanged; only newly written reports carry the corrected throw site and previous-chain frames.
Compatibility. Wire format is unchanged (serialize(Codeframe[])), so server-side deserialization should remain compatible. The server template change is additive: without it, frames render but the Caused by: label is absent. Confirm that older server versions tolerate additional frames and any label metadata before production rollout.
Sequencing.
Maintenance. Minimal. This is a patch-level dependency update with no new config surface. Routine dependency hygiene is sufficient.
Support. The main support nuance is the paired server template. Until bug-catcher#19 is deployed, users may ask why Caused by: labels are missing even though extra frames appear. Document the version pairing in release notes. Existing reports will not retroactively gain throw-site accuracy, which should be expected and communicated.
Scaling. Previous-exception chains can multiply the number of frames per report, and code-window extraction adds context lines to the first frame. This is usually modest, but high-volume exception paths should be monitored for payload size, serialization cost, and network overhead. Consider sampling or rate limiting for noisy exceptions if payload growth is material.
Failure modes. The primary degraded mode is missing server template support, which affects labels only, not frame presence. The fallback path for non-Throwable Monolog context still relies on string parsing and should be treated as best-effort. Code-window extraction depends on the vendor parser, so parser changes in dependencies should be watched during future upgrades. Rollback is low-risk because the wire format is unchanged.
Ramp-up. Low. A TPM can treat this as a routine patch with one cross-team checkpoint: confirm the server template deployment and validate a handful of nested-exception reports before broad rollout.
How can I help you explore Laravel packages today?