Ignition
This is an older version of the package, and we recommend that you upgrade to the latest version of the Flare client.
Installation
On this page, you'll learn how to install Ignition in your project
Laravel apps
In Laravel applications, Ignition is installed by default.
Optionally, you could publish the ignition and flare config file to have fine-grained control over how Ignition behaves.
php artisan vendor:publish --tag="ignition-config"
php artisan vendor:publish --tag="flare-config"
@## Non-Laravel apps
In a non-Laravel PHP application, you can install Ignition via Composer.
composer require spatie/ignition
Here's a minimal example on how to register ignition.
use Spatie\Ignition\Ignition;
include 'vendor/autoload.php';
Ignition::make()->register();
In order to display the Ignition error page when an error occurs in your project, you must add this code. Typically, this would be done in the bootstrap part of your application.
Spatie\Ignition\Ignition::make()->register();
Setting the application path
When setting the application path, Ignition will trim the given value from all paths. This will make the error page look more cleaner.
Spatie\Ignition\Ignition::make()
->applicationPath($basePathOfYourApplication)
->register();
Using dark mode
By default, Ignition uses a nice white based theme. If this is too bright for your eyes, you can use dark mode.
Spatie\Ignition\Ignition::make()
->useDarkMode()
->register();
Stack trace arguments
By default, Ignition will show you arguments which are passed to functions and methods in the stack trace. You can find more about how this works in the stack trace arguments section.
Avoid rendering Ignition in a production environment
You don't want to render the Ignition error page in a production environment, as it potentially can display sensitive information.
To avoid rendering Ignition, you can call shouldDisplayException and pass it a falsy value.
Spatie\Ignition\Ignition::make()
->shouldDisplayException($inLocalEnvironment)
->register();
Reporting security issues
Please don't use the public issue tracker, but report all security issues to [email protected]
Sharing errors
Introduction
The error sharing feature in Ignition enables users to easily share their local error occurrences with colleagues. By clicking the "share" button, users can generate a unique and publicly accessible URL that displays their local error. Ignition shares are ideal for attaching to GitHub issues or sharing in Slack because they have no expiration date. The sharing capability is provided by Flare at no cost and without any usage restrictions.
What data gets shared?
When using Ignition's sharing feature, you can choose what exception data and context to include in the shared error page. The following three sections are available for sharing and correspond to Ignition's page sections:
- Stack: Provides a detailed stack trace that shows the sequence of method calls leading to the error, including file paths and arguments.
- Context: Offers relevant contextual information about the error, such as request payload, headers, routing details, and view variables.
- Debug: Displays additional debugging information like
dumpoutput, SQL queries with bindings, and logs, providing deeper insights into the error.
Generally, the data included in the Ignition error page and its shared errors is safe to share with colleagues. However, as always, common sense applies. It is important to note that the data may contain sensitive information, such as database credentials, API keys, or other secrets. Therefore, it is recommended to review the data visible in Ignition before sharing it with others. Be especially careful when dealing with production data locally.
Removing shared errors
To maintain privacy and control over shared error pages, Flare offers a simple method for removing shares. When sharing an error, an ownership cookie is automatically set in your browser. To delete the shared error, simply visit the shared error from the same browser and look for the "Delete Share" button.
In the rare event that the "Delete Share" button is not visible or you encounter any issues, please contact Flare's dedicated support team at [email protected] and include the share URL you would like to have removed.
- On this page
- Installation
- Reporting security issues
- Sharing errors