From 0d465ebaaf7c738e1554b21ec62678551af98d2c Mon Sep 17 00:00:00 2001 From: Jellyfrog Date: Mon, 7 Nov 2022 18:51:55 +0100 Subject: [PATCH] wip --- LibreNMS/Data/Store/Datastore.php | 2 +- LibreNMS/ObjectCache.php | 1 - app/Console/LnmsCommand.php | 4 +- .../Widgets/TopErrorsController.php | 2 +- .../Middleware/AddGitInformation.php | 2 +- .../Reporting/Middleware/CleanContext.php | 2 +- .../Reporting/Middleware/SetGroups.php | 2 +- .../Reporting/Middleware/SetInstanceId.php | 2 +- composer.json | 1 + composer.lock | 740 +++++++++++++++++- config/flare.php | 77 +- config/ignition.php | 125 ++- 12 files changed, 920 insertions(+), 40 deletions(-) diff --git a/LibreNMS/Data/Store/Datastore.php b/LibreNMS/Data/Store/Datastore.php index 87fba8c058..0c79bd5647 100644 --- a/LibreNMS/Data/Store/Datastore.php +++ b/LibreNMS/Data/Store/Datastore.php @@ -155,7 +155,7 @@ class Datastore /** * Get the measurements for all datastores, keyed by datastore name * - * @return \Illuminate\Support\Collection<\App\Polling\Measure\MeasurementCollection> + * @return \Illuminate\Support\Collection */ public function getStats(): Collection { diff --git a/LibreNMS/ObjectCache.php b/LibreNMS/ObjectCache.php index e7c0c258d6..dfff8c4790 100644 --- a/LibreNMS/ObjectCache.php +++ b/LibreNMS/ObjectCache.php @@ -90,7 +90,6 @@ class ObjectCache implements ArrayAccess * @param mixed $obj Name of Data-Object * @return mixed */ - #[\ReturnTypeWillChange] public function offsetGet($obj): mixed { if (isset($this->data[$obj])) { diff --git a/app/Console/LnmsCommand.php b/app/Console/LnmsCommand.php index 4bd543e907..8396815ca6 100644 --- a/app/Console/LnmsCommand.php +++ b/app/Console/LnmsCommand.php @@ -74,7 +74,7 @@ abstract class LnmsCommand extends Command public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null): static { // use a generated translation location by default - if (is_null($description)) { + if (empty($description)) { $description = __('commands.' . $this->getName() . '.arguments.' . $name); } @@ -99,7 +99,7 @@ abstract class LnmsCommand extends Command public function addOption(string $name, array|string|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static { // use a generated translation location by default - if (is_null($description)) { + if (empty($description)) { $description = __('commands.' . $this->getName() . '.options.' . $name); } diff --git a/app/Http/Controllers/Widgets/TopErrorsController.php b/app/Http/Controllers/Widgets/TopErrorsController.php index bf236011be..fd178820f0 100644 --- a/app/Http/Controllers/Widgets/TopErrorsController.php +++ b/app/Http/Controllers/Widgets/TopErrorsController.php @@ -61,7 +61,7 @@ class TopErrorsController extends WidgetController ->where(function ($query) { return $query ->where('ifInErrors_rate', '>', 0) - ->orwhere('ifOutErrors_rate', '>', 0); + ->orWhere('ifOutErrors_rate', '>', 0); }) ->isUp() ->when($data['device_group'], function ($query) use ($data) { diff --git a/app/Logging/Reporting/Middleware/AddGitInformation.php b/app/Logging/Reporting/Middleware/AddGitInformation.php index 47280c9ea3..11bba25bd6 100644 --- a/app/Logging/Reporting/Middleware/AddGitInformation.php +++ b/app/Logging/Reporting/Middleware/AddGitInformation.php @@ -31,7 +31,7 @@ use Spatie\FlareClient\Report; class AddGitInformation { /** - * @param \Facade\FlareClient\Report $report + * @param \Spatie\FlareClient\Report $report * @param callable $next next in the pipeline * @return mixed */ diff --git a/app/Logging/Reporting/Middleware/CleanContext.php b/app/Logging/Reporting/Middleware/CleanContext.php index 5220cde07f..b0c9bf14c3 100644 --- a/app/Logging/Reporting/Middleware/CleanContext.php +++ b/app/Logging/Reporting/Middleware/CleanContext.php @@ -32,7 +32,7 @@ class CleanContext /** * Middleware to remove sensitive data from the context. * - * @param \Facade\FlareClient\Report $report + * @param \Spatie\FlareClient\Report $report * @param callable $next * @return mixed */ diff --git a/app/Logging/Reporting/Middleware/SetGroups.php b/app/Logging/Reporting/Middleware/SetGroups.php index c024b223db..3578268912 100644 --- a/app/Logging/Reporting/Middleware/SetGroups.php +++ b/app/Logging/Reporting/Middleware/SetGroups.php @@ -33,7 +33,7 @@ class SetGroups /** * Middleware to set LibreNMS and Tools grouping data * - * @param \Facade\FlareClient\Report $report + * @param \Spatie\FlareClient\Report $report * @param callable $next * @return mixed */ diff --git a/app/Logging/Reporting/Middleware/SetInstanceId.php b/app/Logging/Reporting/Middleware/SetInstanceId.php index 59eccf712d..056db99619 100644 --- a/app/Logging/Reporting/Middleware/SetInstanceId.php +++ b/app/Logging/Reporting/Middleware/SetInstanceId.php @@ -30,7 +30,7 @@ class SetInstanceId /** * Middleware to add instance ID, piggybacks on the "user id" feature. * - * @param \Facade\FlareClient\Report $report + * @param \Spatie\FlareClient\Report $report * @param callable $next * @return mixed */ diff --git a/composer.json b/composer.json index 0940ae3f3b..0d5c3814cc 100644 --- a/composer.json +++ b/composer.json @@ -58,6 +58,7 @@ "require-dev": { "barryvdh/laravel-debugbar": "^3.6", "barryvdh/laravel-ide-helper": "^2.12", + "composer/composer": "^2.4", "fakerphp/faker": "^1.9.1", "friendsofphp/php-cs-fixer": "^v3.4", "laravel/dusk": "^7.1", diff --git a/composer.lock b/composer.lock index 1581e9cf06..9c2a752ff4 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "4bbcde4b19dc7e846c05e40270206160", + "content-hash": "9921ea55b62f77f05208738b5b783b31", "packages": [ { "name": "amenadiel/jpgraph", @@ -8788,6 +8788,336 @@ }, "time": "2018-12-13T10:34:14+00:00" }, + { + "name": "composer/ca-bundle", + "version": "1.3.4", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "69098eca243998b53eed7a48d82dedd28b447cd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/69098eca243998b53eed7a48d82dedd28b447cd5", + "reference": "69098eca243998b53eed7a48d82dedd28b447cd5", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.3.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-10-12T12:08:29+00:00" + }, + { + "name": "composer/class-map-generator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-06-19T11:31:27+00:00" + }, + { + "name": "composer/composer", + "version": "2.4.4", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "e8d9087229bcdbc5867594d3098091412f1130cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/e8d9087229bcdbc5867594d3098091412f1130cf", + "reference": "e8d9087229bcdbc5867594d3098091412f1130cf", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/class-map-generator": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/pcre": "^2 || ^3", + "composer/semver": "^3.0", + "composer/spdx-licenses": "^1.5.7", + "composer/xdebug-handler": "^2.0.2 || ^3.0.3", + "justinrainbow/json-schema": "^5.2.11", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "react/promise": "^2.8", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.2", + "seld/signal-handler": "^2.0", + "symfony/console": "^5.4.11 || ^6.0.11", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/polyfill-php73": "^1.24", + "symfony/polyfill-php80": "^1.24", + "symfony/process": "^5.4 || ^6.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1", + "phpstan/phpstan-symfony": "^1.2.10", + "symfony/phpunit-bridge": "^6.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "phpstan": { + "includes": [ + "phpstan/rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/2.4.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-10-27T12:39:29+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" + }, { "name": "composer/pcre", "version": "3.0.0", @@ -8940,6 +9270,86 @@ ], "time": "2022-04-01T19:23:25+00:00" }, + { + "name": "composer/spdx-licenses", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "c848241796da2abf65837d51dce1fae55a960149" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", + "reference": "c848241796da2abf65837d51dce1fae55a960149", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-05-23T07:37:50+00:00" + }, { "name": "composer/xdebug-handler", "version": "3.0.3", @@ -10924,6 +11334,82 @@ }, "time": "2021-02-03T23:26:27+00:00" }, + { + "name": "react/promise", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-02-11T10:27:51+00:00" + }, { "name": "sebastian/cli-parser", "version": "1.0.1", @@ -11888,6 +12374,179 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "4211420d25eba80712bff236a98960ef68b866b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", + "reference": "4211420d25eba80712bff236a98960ef68b866b7", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2022-04-01T13:37:23+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" + }, + "time": "2022-08-31T10:31:18+00:00" + }, + { + "name": "seld/signal-handler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/signal-handler.git", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/f69d119511dc0360440cdbdaa71829c149b7be75", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "psr/log": "^1 || ^2 || ^3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\Signal\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", + "keywords": [ + "posix", + "sigint", + "signal", + "sigterm", + "unix" + ], + "support": { + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.1" + }, + "time": "2022-07-20T18:31:45+00:00" + }, { "name": "staudenmeir/dusk-updater", "version": "v1.3", @@ -12069,6 +12728,85 @@ ], "time": "2022-02-25T11:15:52+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, { "name": "symfony/stopwatch", "version": "v6.1.5", diff --git a/config/flare.php b/config/flare.php index 672d3663ba..9df2fe5a13 100644 --- a/config/flare.php +++ b/config/flare.php @@ -8,6 +8,18 @@ | request an environment variable to be created upstream or send a pull request. */ +use Spatie\FlareClient\FlareMiddleware\AddGitInformation; +use Spatie\FlareClient\FlareMiddleware\RemoveRequestIp; +use Spatie\FlareClient\FlareMiddleware\CensorRequestBodyFields; +use Spatie\FlareClient\FlareMiddleware\CensorRequestHeaders; +use Spatie\LaravelIgnition\FlareMiddleware\AddDumps; +use Spatie\LaravelIgnition\FlareMiddleware\AddEnvironmentInformation; +use Spatie\LaravelIgnition\FlareMiddleware\AddExceptionInformation; +use Spatie\LaravelIgnition\FlareMiddleware\AddJobs; +use Spatie\LaravelIgnition\FlareMiddleware\AddLogs; +use Spatie\LaravelIgnition\FlareMiddleware\AddQueries; +use Spatie\LaravelIgnition\FlareMiddleware\AddNotifierName; + return [ /* | @@ -25,29 +37,55 @@ return [ /* |-------------------------------------------------------------------------- - | Reporting Options + | Middleware |-------------------------------------------------------------------------- | - | These options determine which information will be transmitted to Flare. + | These middleware will modify the contents of the report sent to Flare. | */ - 'reporting' => [ - 'anonymize_ips' => true, - 'collect_git_information' => false, - 'report_queries' => true, - 'maximum_number_of_collected_queries' => 50, - 'report_query_bindings' => true, - 'report_view_data' => true, - 'grouping_type' => null, - 'report_logs' => false, - 'maximum_number_of_collected_logs' => 50, - 'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'], + 'flare_middleware' => [ + RemoveRequestIp::class, + //AddGitInformation::class, + AddNotifierName::class, + AddEnvironmentInformation::class, + AddExceptionInformation::class, + AddDumps::class, + /* + AddLogs::class => [ + 'maximum_number_of_collected_logs' => 200, + ], + */ + AddQueries::class => [ + 'maximum_number_of_collected_queries' => 50, + 'report_query_bindings' => true, + ], + AddJobs::class => [ + 'max_chained_job_reporting_depth' => 5, + ], + CensorRequestBodyFields::class => [ + 'censor_fields' => [ + 'password', + 'password_confirmation', + // LibreNMS + 'username', + 'sysContact', + 'community', + 'authname', + 'authpass', + 'cryptopass' + ], + ], + CensorRequestHeaders::class => [ + 'headers' => [ + 'API-KEY', + ] + ] ], /* |-------------------------------------------------------------------------- - | Reporting Log statements + | Reporting log statements |-------------------------------------------------------------------------- | | If this setting is `false` log statements won't be sent as events to Flare, @@ -56,15 +94,4 @@ return [ */ 'send_logs_as_events' => false, - - /* - |-------------------------------------------------------------------------- - | Censor request body fields - |-------------------------------------------------------------------------- - | - | These fields will be censored from your request when sent to Flare. - | - */ - - 'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'], ]; diff --git a/config/ignition.php b/config/ignition.php index db57d26f5e..da5e551ae2 100644 --- a/config/ignition.php +++ b/config/ignition.php @@ -1,5 +1,36 @@ env('REGISTER_IGNITION_COMMANDS', false), + /* + |-------------------------------------------------------------------------- + | Solution Providers + |-------------------------------------------------------------------------- + | + | You may specify a list of solution providers (as fully qualified class + | names) that shouldn't be loaded. Ignition will ignore these classes + | and possible solutions provided by them will never be displayed. + | + */ + + 'solution_providers' => [ + ], + /* |-------------------------------------------------------------------------- | Ignored Solution Providers @@ -70,7 +116,27 @@ return [ */ 'ignored_solution_providers' => [ - \Facade\Ignition\SolutionProviders\MissingPackageSolutionProvider::class, + // from spatie/ignition + BadMethodCallSolutionProvider::class, + MergeConflictSolutionProvider::class, + UndefinedPropertySolutionProvider::class, + + // from spatie/laravel-ignition + IncorrectValetDbCredentialsSolutionProvider::class, + MissingAppKeySolutionProvider::class, + DefaultDbNameSolutionProvider::class, + TableNotFoundSolutionProvider::class, + MissingImportSolutionProvider::class, + InvalidRouteActionSolutionProvider::class, + ViewNotFoundSolutionProvider::class, + RunningLaravelDuskInProductionProvider::class, + MissingColumnSolutionProvider::class, + UnknownValidationSolutionProvider::class, + MissingMixManifestSolutionProvider::class, + MissingViteManifestSolutionProvider::class, + MissingLivewireComponentSolutionProvider::class, + UndefinedViewVariableSolutionProvider::class, + GenericLaravelExceptionSolutionProvider::class, ], /* @@ -79,8 +145,15 @@ return [ |-------------------------------------------------------------------------- | | Some solutions that Ignition displays are runnable and can perform - | various tasks. Runnable solutions are enabled when your app has - | debug mode enabled. You may also fully disable this feature. + | various tasks. By default, runnable solutions are only enabled when your + | app has debug mode enabled and the environment is `local` or + | `development`. + | + | Using the `IGNITION_ENABLE_RUNNABLE_SOLUTIONS` environment variable, you + | can override this behaviour and enable or disable runnable solutions + | regardless of the application's environment. + | + | Default: env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS') | */ @@ -109,7 +182,7 @@ return [ | */ - 'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''), + 'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', base_path()), 'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''), /* @@ -121,6 +194,48 @@ return [ | specify a route prefix that will be used to host all internal links. | */ + 'housekeeping_endpoint_prefix' => '_ignition', + /* + |-------------------------------------------------------------------------- + | Settings File + |-------------------------------------------------------------------------- + | + | Ignition allows you to save your settings to a specific global file. + | + | If no path is specified, a file with settings will be saved to the user's + | home directory. The directory depends on the OS and its settings but it's + | typically `~/.ignition.json`. In this case, the settings will be applied + | to all of your projects where Ignition is used and the path is not + | specified. + | + | However, if you want to store your settings on a project basis, or you + | want to keep them in another directory, you can specify a path where + | the settings file will be saved. The path should be an existing directory + | with correct write access. + | For example, create a new `ignition` folder in the storage directory and + | use `storage_path('ignition')` as the `settings_file_path`. + | + | Default value: '' (empty string) + */ + + 'settings_file_path' => '', + + /* + |-------------------------------------------------------------------------- + | Recorders + |-------------------------------------------------------------------------- + | + | Ignition registers a couple of recorders when it is enabled. Below you may + | specify a recorders will be used to record specific events. + | + */ + + 'recorders' => [ + DumpRecorder::class, + JobRecorder::class, + LogRecorder::class, + QueryRecorder::class + ] ];