Error reporting (#14190)

* Error reporting

* Move code to ErrorReportingProvider
Enable reporting of error (and warning) messages.
report module exceptions

* Restore flare key
Not needed to set late anymore.  We set up filtering before it is initialized.

* Remove unnecessary and maybe double Flare report

* lint

* Cannot use typed properties yet, use phpdoc

* fix handleError return type

* Filter both exceptions and reports (so we don't miss any)
Consolidate the check if reporting should be enabled

* Cache reportingEnabled check for the runtime

* Split out middleware to improve readability
Logging of why reporting is disabled
Fix reportingEnabled cache

* Style

* Return some user data

* Change to class based middleware, it looks nicer

* Fix error page error id report, add url.

* also rewrite intended url

* remove link

* Move ignition to production and update flare-client

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Jellyfrog
2022-08-24 00:33:28 +02:00
committed by GitHub
parent 9ce05d7628
commit 1dbab5ac7e
19 changed files with 760 additions and 205 deletions

View File

@@ -47,7 +47,7 @@ class Config
public static function load()
{
// don't reload the config if it is already loaded, reload() should be used for that
if (! is_null(self::$config)) {
if (self::isLoaded()) {
return self::$config;
}
@@ -566,4 +566,14 @@ class Config
self::set('db_port', config("database.connections.$db.port", 3306));
self::set('db_socket', config("database.connections.$db.unix_socket"));
}
/**
* Check if the config has been loaded yet
*
* @return bool
*/
public static function isLoaded(): bool
{
return ! is_null(self::$config);
}
}