From d4832d057cc7f3450cbaf8b2e79d81ab6d4ce3ff Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 19 Oct 2021 10:59:07 +0100 Subject: [PATCH 1/2] Logs deprecations instead of treating them as exceptions --- .env.example | 1 + composer.json | 4 ++-- config/logging.php | 13 +++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 44853cd59a7..b7becbac44b 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql diff --git a/composer.json b/composer.json index 3c6d778d1d3..61f49126466 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "php": "^7.3|^8.0", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", - "laravel/framework": "^8.54", + "laravel/framework": "^8.65", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5" }, @@ -18,7 +18,7 @@ "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^5.10", - "phpunit/phpunit": "^9.5.8" + "phpunit/phpunit": "^9.5.10" }, "autoload": { "psr-4": { diff --git a/config/logging.php b/config/logging.php index 1aa06aa30f5..69064c23fb3 100644 --- a/config/logging.php +++ b/config/logging.php @@ -19,6 +19,19 @@ 'default' => env('LOG_CHANNEL', 'stack'), + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log driver that should be used to log deprecated + | code still in use by your application. This allows you to prepare your + | application's code for upcoming major versions of your dependencies. + | + */ + + 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + /* |-------------------------------------------------------------------------- | Log Channels From 4ae91bf3bc81b7525bdc421b37c77a77ad97ebd0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 19 Oct 2021 08:41:37 -0500 Subject: [PATCH 2/2] formatting --- config/logging.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/logging.php b/config/logging.php index 69064c23fb3..880cd92278c 100644 --- a/config/logging.php +++ b/config/logging.php @@ -24,9 +24,9 @@ | Deprecations Log Channel |-------------------------------------------------------------------------- | - | This option controls the log driver that should be used to log deprecated - | code still in use by your application. This allows you to prepare your - | application's code for upcoming major versions of your dependencies. + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. | */