astrotomic/ignition-stackoverflow
Ignition StackOverflow adds a solution provider to Laravel's Ignition error page, automatically searching Stack Overflow for the thrown exception and displaying related questions and answers right where you need them, so you can debug faster without leaving the page.
astrotomic/ignition-stackoverflow is a dev-only Ignition solution provider: when an exception is thrown in a local/staging environment, the Ignition error page gains a "Search Stack Overflow" action that opens a pre-filled Stack Overflow search for the exception. It is not a runtime error handler — nothing changes for your users, and it should never reach production.
Minimal setup:
composer require --dev astrotomic/ignition-stackoverflow
php artisan vendor:publish --tag=stackoverflow-config # inspect the tag/provider in the package README
config/app.php edit is needed unless you have extra.laravel.dont-discover set.config/ignition.php.QueryException or a TypeError from a typo'd argument), open the error page, click the Stack Overflow action, and confirm the resulting query is something you'd actually have typed yourself. If it isn't, that's a config problem, not a package problem.Version 1.7.0 is a low-risk release: explicit PHP 8.0 support and a search-query cleanup. Nothing to migrate.
Treat the config as team infrastructure. The value of this package is entirely in the quality of the generated query. Commit the published config and tune it once so every developer gets the same useful search instead of a URL containing a stack trace, a UUID, and their home directory.
Sanitize before you search. Raw exception messages are full of noise: quoted SQL, integer IDs, absolute paths, timestamps, generated class names. A query that includes them returns zero results. In your config's query callback/template, normalise aggressively:
// config/stackoverflow.php (shape may vary by version — check the published file)
'query' => function (\Throwable $throwable): string {
$message = $throwable->getMessage();
// strip volatile fragments that poison a search
$message = preg_replace('/\b[0-9a-f]{8}-[0-9a-f-]{27,}\b/i', '', $message); // UUIDs
$message = preg_replace('/\b\d+\b/', '?', $message); // IDs, line numbers
$message = preg_replace('/[\'"][^\'"]{40,}[\'"]/', '...', $message); // long literals
$message = str_replace([base_path(), storage_path(), PHP_EOL], ['', '', ' '], $message);
return trim(preg_replace('/\s+/', ' ', $message)) . ' laravel';
},
Keep the class name and file basename, drop the message tail. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry searches well; the same string with a 36-character UUID appended does not.
Coexist with Ignition's solution list. Ignition's config controls which solution providers run. If you want this provider only on some environments (say, local but not staging), gate it there rather than removing the package:
// config/ignition.php
'solutions' => [
// ...
Astrotomic\IgnitionStackOverflow\IgnitionStackOverflowServiceProvider::class,
],
Use it as a template for internal solutions. The package is small and its real lesson is the SolutionProvider contract: once you've seen it work, the same pattern gives you "Search our Confluence", "Open the runbook for this queue", or "This exception means X — see ADR-14". Copy the provider shape rather than writing a bespoke Ignition extension.
Deployment hygiene. Keep it in require-dev, deploy with composer install --no-dev, and confirm your base composer.json doesn't accidentally promote it to require (a common outcome of running composer require without --dev).
base_path() was removed from the query construction. Two consequences: queries are now machine-independent (good — the same error produces the same link for everyone), and anyone who patched around the old behaviour, or who wrote a query callback assuming paths were already stripped, should re-verify what the generated URL looks like. Re-run a familiar exception and eyeball it once after upgrading.spatie/ignition / facade/ignition constraint before assuming the provider still renders. If the action silently disappears, suspect an Ignition major bump, not a bug in this package.APP_DEBUG=true; is the package installed without --no-dev; did auto-discovery get disabled globally; does config/ignition.php's solutions array still list the provider; is config:cached from an older state. php artisan config:clear fixes a surprising share of "the package doesn't work" reports.How can I help you explore Laravel packages today?