Skip to content
Merged

CI #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
flare-bundle:
container_name: flare-bundle
hostname: flare-bundle
image: php:8.4-fpm-trixie
image: php:8.3-fpm-trixie
volumes:
- ~/.ssh:/root/.ssh
- ../:/workspaces/flare-bundle
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PR Checks
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
ci:
name: PR Checks
runs-on: ubuntu-latest
steps:
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader

- name: Run static analysis
run: composer run analyse

- name: Run linter
run: composer run check
File renamed without changes.
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Symfony Flare Bundle
Send Symfony errors to Flare! This project is the Symfony counterpart of the [Laravel Flare](https://github.com/spatie/laravel-flare) package.

## Installation
Install the package via composer:

```bash
composer require flawe/flare-bundle
```

Add the bundle to your Symfony application by adding it to the `config/bundles.php` file:

```php
return [
// ...
Flawe\FlareBundle\FlareBundle::class => ['all' => true],
];
```

Add your Flare API key to your `.env` file:

```ini
FLARE_KEY=your-flare-key
```

And finally, add the file `config/packages/flare.yaml` and fill it with your settings:

```yaml
flare:
key: '%env(FLARE_KEY)%'
trace: false
censor:
client_ips: true
body_fields: []
headers: []
cookies: true
session: true
```

The minimum configuration requires the `key` option.

## Usage
The bundle will automatically report all errors to Flare.

On top of that, you can inject Flare to monitor perfomance:

```php
namespace App\Controller;

use Spatie\FlareClient\Flare;
use Symfony\Component\HttpFoundation\Response;

class SomeController
{
#[Route('/some-action')]
public function someAction(Flare $flare): Response
{
$flare->application()->recordStart();
// Do something
$flare->application()->recordEnd();

return new Response('Some Response');
}
}
```
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "flawe/flare-bundle",
"description": "Send symfony errors to Flare",
"license": "MIT",
"type": "symfony-bundle",
"version": "0.0.1",
"authors": [
{
"name": "François Lavaud-Wernert"
"name": "François Lavaud-Wernert",
"email": "francois@lavaud.family"
}
],
"require": {
"php": ">=8.4",
"php": ">=8.3",
"spatie/flare-client-php": "^2.0",
"symfony/config": "^8.0",
"symfony/dependency-injection": "^8.0",
"symfony/http-kernel": "^8.0"
"symfony/config": "^7.0",
"symfony/dependency-injection": "^7.0",
"symfony/http-kernel": "^7.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.51",
Expand Down
Loading
Loading