feat: Add Flare support

- Add new log channel "flare" and update "stack" channel to use it
- Introduce placeholders for log messages in several channels
- Add processors to "papertrail" and "stderr" channels
- Add `spatie/laravel-ignition` package to composer requirements
- Change `$dontReport` variable to `$dontFlash` in exception handler
- Add `FLARE_KEY` and `BRIDGY_MASTODON_TOKEN` to `.env.github` and `.env.example` files
This commit is contained in:
Jonny Barnes 2023-06-09 14:07:24 +01:00
parent 4d9989b37b
commit 79b9013707
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
6 changed files with 337 additions and 383 deletions

614
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "617504ea1be00f742145197dbe3b5792",
"content-hash": "9886cdbfb5e6a5d454345c91d160466e",
"packages": [
{
"name": "aws/aws-crt-php",
@ -4659,6 +4659,68 @@
],
"time": "2022-12-17T21:53:22+00:00"
},
{
"name": "spatie/backtrace",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/backtrace.git",
"reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/backtrace/zipball/ec4dd16476b802dbdc6b4467f84032837e316b8c",
"reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "^9.3",
"spatie/phpunit-snapshot-assertions": "^4.2",
"symfony/var-dumper": "^5.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Backtrace\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van de Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A better backtrace",
"homepage": "https://github.com/spatie/backtrace",
"keywords": [
"Backtrace",
"spatie"
],
"support": {
"source": "https://github.com/spatie/backtrace/tree/1.4.0"
},
"funding": [
{
"url": "https://github.com/sponsors/spatie",
"type": "github"
},
{
"url": "https://spatie.be/open-source/support-us",
"type": "other"
}
],
"time": "2023-03-04T08:57:24+00:00"
},
{
"name": "spatie/commonmark-highlighter",
"version": "3.0.0",
@ -4713,6 +4775,250 @@
},
"time": "2021-08-04T18:03:57+00:00"
},
{
"name": "spatie/flare-client-php",
"version": "1.3.6",
"source": {
"type": "git",
"url": "https://github.com/spatie/flare-client-php.git",
"reference": "530ac81255af79f114344286e4275f8869c671e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/530ac81255af79f114344286e4275f8869c671e2",
"reference": "530ac81255af79f114344286e4275f8869c671e2",
"shasum": ""
},
"require": {
"illuminate/pipeline": "^8.0|^9.0|^10.0",
"php": "^8.0",
"spatie/backtrace": "^1.2",
"symfony/http-foundation": "^5.0|^6.0",
"symfony/mime": "^5.2|^6.0",
"symfony/process": "^5.2|^6.0",
"symfony/var-dumper": "^5.2|^6.0"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.3.0",
"pestphp/pest": "^1.20",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/phpunit-snapshot-assertions": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.1.x-dev"
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\FlareClient\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Send PHP errors to Flare",
"homepage": "https://github.com/spatie/flare-client-php",
"keywords": [
"exception",
"flare",
"reporting",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/flare-client-php/issues",
"source": "https://github.com/spatie/flare-client-php/tree/1.3.6"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-04-12T07:57:12+00:00"
},
{
"name": "spatie/ignition",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/ignition.git",
"reference": "ad13a6792992411e05d3d3b293e26bdf9f9a7321"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/ignition/zipball/ad13a6792992411e05d3d3b293e26bdf9f9a7321",
"reference": "ad13a6792992411e05d3d3b293e26bdf9f9a7321",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": "^8.0",
"spatie/backtrace": "^1.4",
"spatie/flare-client-php": "^1.1",
"symfony/console": "^5.4|^6.0",
"symfony/var-dumper": "^5.4|^6.0"
},
"require-dev": {
"illuminate/cache": "^9.52",
"mockery/mockery": "^1.4",
"pestphp/pest": "^1.20",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"psr/simple-cache-implementation": "*",
"symfony/cache": "^6.2",
"symfony/process": "^5.4|^6.0",
"vlucas/phpdotenv": "^5.5"
},
"suggest": {
"openai-php/client": "Require get solutions from OpenAI",
"simple-cache-implementation": "To cache solutions from OpenAI"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.5.x-dev"
}
},
"autoload": {
"psr-4": {
"Spatie\\Ignition\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Spatie",
"email": "info@spatie.be",
"role": "Developer"
}
],
"description": "A beautiful error page for PHP applications.",
"homepage": "https://flareapp.io/ignition",
"keywords": [
"error",
"flare",
"laravel",
"page"
],
"support": {
"docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
"forum": "https://twitter.com/flareappio",
"issues": "https://github.com/spatie/ignition/issues",
"source": "https://github.com/spatie/ignition"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-05-25T10:19:32+00:00"
},
{
"name": "spatie/laravel-ignition",
"version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ignition.git",
"reference": "35711943d4725aa80f8033e4f1cb3a6775530b25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/35711943d4725aa80f8033e4f1cb3a6775530b25",
"reference": "35711943d4725aa80f8033e4f1cb3a6775530b25",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"illuminate/support": "^10.0",
"php": "^8.1",
"spatie/flare-client-php": "^1.3.5",
"spatie/ignition": "^1.5.0",
"symfony/console": "^6.2.3",
"symfony/var-dumper": "^6.2.3"
},
"require-dev": {
"livewire/livewire": "^2.11",
"mockery/mockery": "^1.5.1",
"openai-php/client": "^0.3.4",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^1.22.3",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.1.1",
"phpstan/phpstan-phpunit": "^1.3.3",
"vlucas/phpdotenv": "^5.5"
},
"suggest": {
"openai-php/client": "Require get solutions from OpenAI",
"psr/simple-cache-implementation": "Needed to cache solutions from OpenAI"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\LaravelIgnition\\IgnitionServiceProvider"
],
"aliases": {
"Flare": "Spatie\\LaravelIgnition\\Facades\\Flare"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\LaravelIgnition\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Spatie",
"email": "info@spatie.be",
"role": "Developer"
}
],
"description": "A beautiful error page for Laravel applications.",
"homepage": "https://flareapp.io/ignition",
"keywords": [
"error",
"flare",
"laravel",
"page"
],
"support": {
"docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
"forum": "https://twitter.com/flareappio",
"issues": "https://github.com/spatie/laravel-ignition/issues",
"source": "https://github.com/spatie/laravel-ignition"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-05-25T11:30:27+00:00"
},
{
"name": "symfony/console",
"version": "v6.3.0",
@ -11223,312 +11529,6 @@
],
"time": "2023-05-11T14:04:07+00:00"
},
{
"name": "spatie/backtrace",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/backtrace.git",
"reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/backtrace/zipball/ec4dd16476b802dbdc6b4467f84032837e316b8c",
"reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "^9.3",
"spatie/phpunit-snapshot-assertions": "^4.2",
"symfony/var-dumper": "^5.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Backtrace\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van de Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A better backtrace",
"homepage": "https://github.com/spatie/backtrace",
"keywords": [
"Backtrace",
"spatie"
],
"support": {
"source": "https://github.com/spatie/backtrace/tree/1.4.0"
},
"funding": [
{
"url": "https://github.com/sponsors/spatie",
"type": "github"
},
{
"url": "https://spatie.be/open-source/support-us",
"type": "other"
}
],
"time": "2023-03-04T08:57:24+00:00"
},
{
"name": "spatie/flare-client-php",
"version": "1.3.6",
"source": {
"type": "git",
"url": "https://github.com/spatie/flare-client-php.git",
"reference": "530ac81255af79f114344286e4275f8869c671e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/530ac81255af79f114344286e4275f8869c671e2",
"reference": "530ac81255af79f114344286e4275f8869c671e2",
"shasum": ""
},
"require": {
"illuminate/pipeline": "^8.0|^9.0|^10.0",
"php": "^8.0",
"spatie/backtrace": "^1.2",
"symfony/http-foundation": "^5.0|^6.0",
"symfony/mime": "^5.2|^6.0",
"symfony/process": "^5.2|^6.0",
"symfony/var-dumper": "^5.2|^6.0"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.3.0",
"pestphp/pest": "^1.20",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/phpunit-snapshot-assertions": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.1.x-dev"
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\FlareClient\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Send PHP errors to Flare",
"homepage": "https://github.com/spatie/flare-client-php",
"keywords": [
"exception",
"flare",
"reporting",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/flare-client-php/issues",
"source": "https://github.com/spatie/flare-client-php/tree/1.3.6"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-04-12T07:57:12+00:00"
},
{
"name": "spatie/ignition",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/ignition.git",
"reference": "ad13a6792992411e05d3d3b293e26bdf9f9a7321"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/ignition/zipball/ad13a6792992411e05d3d3b293e26bdf9f9a7321",
"reference": "ad13a6792992411e05d3d3b293e26bdf9f9a7321",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": "^8.0",
"spatie/backtrace": "^1.4",
"spatie/flare-client-php": "^1.1",
"symfony/console": "^5.4|^6.0",
"symfony/var-dumper": "^5.4|^6.0"
},
"require-dev": {
"illuminate/cache": "^9.52",
"mockery/mockery": "^1.4",
"pestphp/pest": "^1.20",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"psr/simple-cache-implementation": "*",
"symfony/cache": "^6.2",
"symfony/process": "^5.4|^6.0",
"vlucas/phpdotenv": "^5.5"
},
"suggest": {
"openai-php/client": "Require get solutions from OpenAI",
"simple-cache-implementation": "To cache solutions from OpenAI"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.5.x-dev"
}
},
"autoload": {
"psr-4": {
"Spatie\\Ignition\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Spatie",
"email": "info@spatie.be",
"role": "Developer"
}
],
"description": "A beautiful error page for PHP applications.",
"homepage": "https://flareapp.io/ignition",
"keywords": [
"error",
"flare",
"laravel",
"page"
],
"support": {
"docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
"forum": "https://twitter.com/flareappio",
"issues": "https://github.com/spatie/ignition/issues",
"source": "https://github.com/spatie/ignition"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-05-25T10:19:32+00:00"
},
{
"name": "spatie/laravel-ignition",
"version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ignition.git",
"reference": "35711943d4725aa80f8033e4f1cb3a6775530b25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/35711943d4725aa80f8033e4f1cb3a6775530b25",
"reference": "35711943d4725aa80f8033e4f1cb3a6775530b25",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"illuminate/support": "^10.0",
"php": "^8.1",
"spatie/flare-client-php": "^1.3.5",
"spatie/ignition": "^1.5.0",
"symfony/console": "^6.2.3",
"symfony/var-dumper": "^6.2.3"
},
"require-dev": {
"livewire/livewire": "^2.11",
"mockery/mockery": "^1.5.1",
"openai-php/client": "^0.3.4",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^1.22.3",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.1.1",
"phpstan/phpstan-phpunit": "^1.3.3",
"vlucas/phpdotenv": "^5.5"
},
"suggest": {
"openai-php/client": "Require get solutions from OpenAI",
"psr/simple-cache-implementation": "Needed to cache solutions from OpenAI"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\LaravelIgnition\\IgnitionServiceProvider"
],
"aliases": {
"Flare": "Spatie\\LaravelIgnition\\Facades\\Flare"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\LaravelIgnition\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Spatie",
"email": "info@spatie.be",
"role": "Developer"
}
],
"description": "A beautiful error page for Laravel applications.",
"homepage": "https://flareapp.io/ignition",
"keywords": [
"error",
"flare",
"laravel",
"page"
],
"support": {
"docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
"forum": "https://twitter.com/flareappio",
"issues": "https://github.com/spatie/laravel-ignition/issues",
"source": "https://github.com/spatie/laravel-ignition"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-05-25T11:30:27+00:00"
},
{
"name": "spatie/laravel-ray",
"version": "1.32.4",