From a56ddbbf7c209a5ca7e837eb29f27afd1d6263b2 Mon Sep 17 00:00:00 2001 From: QWp6t Date: Tue, 5 Apr 2022 03:13:42 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=EF=B8=8F=20update=20Laravel=20v8.8?= =?UTF-8?q?3.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Illuminate/Foundation/Application.php | 2 +- .../Foundation/Bootstrap/HandleExceptions.php | 13 ++++++++----- .../Foundation/Bootstrap/LoadConfiguration.php | 2 +- src/Illuminate/Foundation/Console/ServeCommand.php | 3 +++ .../Concerns/InteractsWithDeprecationHandling.php | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index bdd9f4e9..4331b2f9 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -33,7 +33,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * * @var string */ - const VERSION = '8.81.0'; + const VERSION = '8.83.6'; /** * The base path for the Laravel installation. diff --git a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php index ced85fea..b6316190 100644 --- a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php +++ b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php @@ -67,11 +67,11 @@ public function bootstrap(Application $app) */ public function handleError($level, $message, $file = '', $line = 0, $context = []) { - if (error_reporting() & $level) { - if ($this->isDeprecation($level)) { - return $this->handleDeprecation($message, $file, $line); - } + if ($this->isDeprecation($level)) { + return $this->handleDeprecation($message, $file, $line); + } + if (error_reporting() & $level) { throw new ErrorException($message, 0, $level, $file, $line); } } @@ -86,7 +86,10 @@ public function handleError($level, $message, $file = '', $line = 0, $context = */ public function handleDeprecation($message, $file, $line) { - if (! class_exists(LogManager::class)) { + if (! class_exists(LogManager::class) + || ! $this->app->hasBeenBootstrapped() + || $this->app->runningUnitTests() + ) { return; } diff --git a/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php b/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php index babbcd3b..501a1eea 100644 --- a/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php +++ b/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php @@ -24,7 +24,7 @@ public function bootstrap(Application $app) // First we will see if we have a cache configuration file. If we do, we'll load // the configuration items from that file so that it is very quick. Otherwise // we will need to spin through every configuration file and load them all. - if (is_file($cached = $app->getCachedConfigPath())) { + if (file_exists($cached = $app->getCachedConfigPath())) { $items = require $cached; $loadedFromCache = true; diff --git a/src/Illuminate/Foundation/Console/ServeCommand.php b/src/Illuminate/Foundation/Console/ServeCommand.php index 331b9dbc..ddb07e82 100644 --- a/src/Illuminate/Foundation/Console/ServeCommand.php +++ b/src/Illuminate/Foundation/Console/ServeCommand.php @@ -104,8 +104,11 @@ protected function startProcess($hasEnvironment) 'APP_ENV', 'LARAVEL_SAIL', 'PHP_CLI_SERVER_WORKERS', + 'PHP_IDE_CONFIG', + 'SYSTEMROOT', 'XDEBUG_CONFIG', 'XDEBUG_MODE', + 'XDEBUG_SESSION', ]) ? [$key => $value] : [$key => false]; })->all()); diff --git a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php index 695fbd68..7a914f7e 100644 --- a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php +++ b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php @@ -38,7 +38,7 @@ protected function withoutDeprecationHandling() { if ($this->originalDeprecationHandler == null) { $this->originalDeprecationHandler = set_error_handler(function ($level, $message, $file = '', $line = 0) { - if (error_reporting() & $level) { + if (in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]) || (error_reporting() & $level)) { throw new ErrorException($message, 0, $level, $file, $line); } });