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.
composer require php-bug-catcher/reporter-bundle); Laravel auto-discovers the service provider. Publish the package config if you need to override defaults, then set the project key/endpoint in .env.stack_trace. It already defaults to true in v2.1.1 — leave it on. Turning it off is the fastest way to lose the value this release adds.BugCatcher::logException($throwable). Call it from a catch block, a report() override, or your global exception handler's report path.throw / call site in your code — not at the caller one level up. That is the headline fix in v2.1.1.context['exception'] automatically.BugCatcher::logException($e) in the catch. This gives you control over which exceptions are worth a report and lets you attach context before it ships.BugCatcherMonologHandler on the exception-handling channel. In v2.1.1 it detects a Throwable in context['exception'] and uses ThrowSiteStacktrace directly; anything else falls back to the old formatted-string parser. You get the fixed frame ordering without touching call sites.Caused by: chain. The new ThrowSiteStacktrace walks getPrevious() and labels those frames. If you routinely wrap low-level exceptions (QueryException inside a domain exception, etc.) this is now the fastest way to see the original failure without leaving the report.CollectCodeFrame::collectThrowableFrames(Throwable) is public and is now the preferred API if you build your own reporting path or push frames into a different sink. collectFrames(string) still exists as the string fallback — keep it only for legacy inputs.serialize(Codeframe[]). If you have an in-house consumer, ingestion pipe, or test fixture asserting on the serialized shape, nothing changes.Caused by: chain. Nothing backfills. Don't debug old reports assuming they reflect the new parser.#0.Caused by: labels need a server-side update. You need the matching php-bug-catcher/bug-catcher#19 template change deployed. Without it the previous-chain frames still appear in the dashboard — they just aren't labelled, which is confusing rather than broken. Deploy both sides together where possible.#0 file(line): message line and re-parsed it with /#\d+ (.*)\((\d+)\): (.*)/. Any exception message containing a (digits): pattern (MySQL error codes, for example) hijacked the file and line. If you see pre-upgrade reports with a :0 line number, that's this bug — not your code.context['exception'] (rather than a Throwable) keeps you on the old parsing path. If a custom handler stringifies exceptions before this handler sees them, you silently lose the fix.stack_trace must be true. It defaults to true in this release, but if an earlier config publish or an environment override set it to false, the new throw-site path never runs and you'll see no frames at all.How can I help you explore Laravel packages today?