Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Ignition Laravel Package

spatie/laravel-ignition

Beautiful, customizable error page for Laravel apps (Laravel 10+ / PHP 8.1+). Ignition improves exception debugging with context and solutions, and can share errors to Flare for production tracking and notifications via an API key.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel-Native Integration: Designed as a first-class citizen for Laravel, leveraging its exception handling middleware (App\Exceptions\Handler). Fits seamlessly into Laravel’s existing error-handling pipeline without requiring invasive architectural changes.
  • Modularity: Lightweight (~100KB) and self-contained, with no forced dependencies beyond Laravel core. Can be enabled/disabled via config or environment variables (e.g., APP_DEBUG).
  • Extensibility: Supports custom solutions, context providers, and middleware hooks. Can be extended via service providers or Blade components for tailored error pages.
  • Flare Integration: Optional but tightly coupled with Flare, Spatie’s error monitoring tool. Enables production error tracking, stack traces, and notifications without leaving the Laravel ecosystem.

Integration Feasibility

  • Laravel Version Support:
    • v2.x: Laravel 10+ (PHP 8.1+). Critical: If the target app uses Laravel <10, facade/ignition (v1.x) must be used instead.
    • Backward Compatibility: v2.x drops support for Laravel 10 in favor of 13+, requiring a migration path for legacy apps.
  • Environment Awareness:
    • Automatically adapts behavior based on APP_ENV (e.g., detailed errors in local, minimal in production).
    • Configurable via config/ignition.php (e.g., show_ignition_in_production, enable_flare).
  • Middleware Order: Must be registered after Laravel’s default exception handler (App\Exceptions\Handler) but before any middleware that might suppress errors (e.g., TrustedProxyMiddleware). Order sensitivity is documented but not enforced by default.

Technical Risk

  • Flare Dependency:
    • Pros: Rich error context, monitoring, and notifications.
    • Cons: Requires a paid Flare subscription for production use (free tier limited to 1 project). May introduce latency if reporting errors externally.
    • Mitigation: Can disable Flare entirely (enable_flare: false) and use Ignition as a standalone error page.
  • Performance Overhead:
    • Minimal in development (only active when errors occur). In production, Flare reporting adds ~50–200ms per error (configurable via report_errors_locally).
    • Risk: Potential for log bloat if report_errors_locally is enabled in production.
  • Livewire/Octane Compatibility:
    • Explicit support for Livewire 3/4 and Laravel Octane, but edge cases may arise in custom setups (e.g., event-driven errors).
    • Test: Validate with php artisan octane:start and Livewire components pre-integration.
  • Security:
    • Sensitive Data: Automatically redacts sensitive headers (e.g., Authorization) and payloads. Custom redacting rules can be added via ignition.php.
    • Risk: Misconfigured ignition.php could expose internal data in error pages. Review sensitive_headers and sensitive_payload_keys defaults.

Key Questions

  1. Laravel Version Alignment:
    • Is the target app on Laravel 10+? If not, can facade/ignition (v1.x) be used, or is a Laravel upgrade feasible?
  2. Flare Adoption:
    • Is the team willing to adopt Flare for monitoring? If not, can Ignition function as a standalone error page?
  3. Production Error Handling:
    • Should errors in production be logged locally (report_errors_locally) or only sent to Flare? Balance between debugging and operational overhead.
  4. Customization Needs:
    • Are there specific error-page designs, solutions, or context providers needed? Ignition supports Blade templates and custom middleware.
  5. CI/CD Impact:
    • Will Ignition’s error pages interfere with automated testing? Disable in CI via APP_DEBUG=false or environment-specific config.
  6. Legacy Middleware:
    • Are there existing middleware that might conflict with Ignition’s order? Audit middleware stack in app/Http/Kernel.php.

Integration Approach

Stack Fit

  • Laravel Core: Native support for Laravel’s exception handling, logging, and middleware systems. No framework-level conflicts.
  • PHP Extensions:
    • Requires php-json, php-mbstring (for Flare reporting). Most modern PHP stacks include these by default.
    • PHP 8.1+: Mandatory for v2.x. Apps on PHP 8.0 or lower must use facade/ignition.
  • Database: No direct DB dependencies, but Flare requires a MySQL/PostgreSQL-compatible database for storing error reports.
  • Frontend: Uses Blade templates for error pages. Custom CSS/JS can be injected via ignition.php or Blade overrides.

Migration Path

  1. Assessment Phase:
    • Verify Laravel/PHP version compatibility.
    • Audit existing error handling (e.g., custom exception handlers, logging).
  2. Installation:
    composer require spatie/laravel-ignition
    php artisan vendor:publish --provider="Spatie\Ignition\IgnitionServiceProvider"
    
    • Publishes config/ignition.php and Blade templates to resources/views/vendor/ignition.
  3. Configuration:
    • Update config/ignition.php:
      'show_ignition_in_production' => env('IGNITION_SHOW_IN_PROD', false),
      'enable_flare' => env('IGNITION_ENABLE_FLARE', false),
      'flare_api_key' => env('FLARE_API_KEY'),
      
    • Set environment variables (e.g., .env):
      FLARE_API_KEY=your-key-here
      IGNITION_SHOW_IN_PROD=false
      
  4. Testing:
    • Development: Trigger errors manually (e.g., 1/0 in a route) to verify UI.
    • Production: Test with APP_DEBUG=false and IGNITION_SHOW_IN_PROD=true (if enabled).
    • Flare: Validate error reporting in Flare dashboard.
  5. Customization (Optional):
    • Override Blade templates in resources/views/vendor/ignition.
    • Add custom solutions via Ignition::registerSolution() in a service provider.
    • Extend context providers for additional error metadata.

Compatibility

  • Laravel Packages:
    • Livewire: Explicit support for Livewire 3/4. Test with livewire:discover and component errors.
    • Octane: Compatible with Laravel Octane (Swoole/RoadRunner). Validate with php artisan octane:start.
    • Horizon/Queues: Errors in queued jobs are captured if report_errors_locally is enabled.
    • API Testing: Works with Laravel’s HTTP tests ($this->withExceptionHandling()).
  • Third-Party Middleware:
    • Risk: Middleware that catches/exceptions (e.g., auth, rate-limiting) may interfere. Ensure Ignition’s middleware runs after Laravel’s exception handler but before suppressing middleware.
    • Solution: Reorder middleware in app/Http/Kernel.php:
      protected $middleware = [
          // ...
          \Spatie\Ignition\Middleware\Ignition::class,
      ];
      

Sequencing

  1. Pre-Installation:
    • Backup existing error-handling logic (e.g., custom render() methods in App\Exceptions\Handler).
    • Document current error-reporting workflows (e.g., Sentry, Bugsnag).
  2. Installation:
    • Run composer require and publish config before enabling in production.
  3. Enablement:
    • Development: Enable by default (APP_DEBUG=true).
    • Production: Gradually roll out with IGNITION_SHOW_IN_PROD=true and monitor error rates.
  4. Flare Onboarding:
    • Set up Flare project before enabling enable_flare to avoid missing errors.
  5. Deprecation:
    • If migrating from facade/ignition (v1.x), update dependencies and test thoroughly.

Operational Impact

Maintenance

  • Configuration Drift:
    • Risk: ignition.php or environment variables may diverge across environments.
    • Mitigation: Use Laravel Envoy or Ansible to manage config across dev/staging/prod.
  • Dependency Updates:
    • Frequency: Spatie packages are actively maintained (last release: 2026-03-17). Monitor GitHub Releases.
    • Upgrade Path: Minor/patch updates are seamless. Major versions (e.g., v2.x) require Laravel version alignment.
  • Custom Solutions:
    • Risk: Custom solutions or context providers may break across Ignition updates.
    • Mitigation: Test updates in a staging environment. Use ignition:clear-solutions to reset customizations.

Support

  • Debugging Workflow:
    • **
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport