flawe / flare-bundle
Send Symfony errors to Flare
v3.2.0
2026-11-08 18:20 UTC
Requires
- php: >=8.3
- spatie/flare-client-php: ^3.0
- symfony/config: ^7.0 || ^8.0
- symfony/dependency-injection: ^7.0 || ^8.0
- symfony/http-foundation: ^7.0 || ^8.0
- symfony/http-kernel: ^7.0 || ^8.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.51
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- symfony/console: ^7.0 || ^8.0
Suggests
- symfony/console: Report errors raised by console commands
- symfony/messenger: Trace Messenger jobs and queued messages
- symfony/monolog-bundle: Send application logs to Flare
Provides
None
Conflicts
None
Replaces
None
README
Send Symfony errors to Flare! This project is the Symfony counterpart of the Laravel Flare package.
Installation
Install the package via composer:
composer require flawe/flare-bundle
Add the bundle to your Symfony application by adding it to the config/bundles.php file:
return [ // ... Flawe\FlareBundle\FlareBundle::class => ['all' => true], ];
Add your Flare API key to your .env file:
FLARE_KEY=your-flare-key
And finally, add the file config/packages/flare.yaml and fill it with your settings:
flare: key: '%env(default::FLARE_KEY)%' trace: false censor: client_ips: true body_fields: [] headers: [] cookies: true session: true
When key is empty or missing, Flare is disabled: nothing is sent and no error is raised.
Usage
The bundle will automatically report all errors to Flare. On top of that, you can inject Flare to monitor performance with custom spans:
namespace App\Controller; use Spatie\FlareClient\Flare; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; class SomeController { #[Route('/some-action')] public function someAction(Flare $flare): Response { $flare->tracer->span('Do something', function () { // Do something }); return new Response('Some Response'); } }