From 6df2bb9e27af72af68eee6cfbb91f157f7f0ef4c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 12 Jul 2021 13:55:15 +0200 Subject: [PATCH 1/4] Clear config after dumping autoloaded files --- composer.json | 1 + src/Illuminate/Foundation/ComposerScripts.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 38674f54fd46..8d37b2454147 100644 --- a/composer.json +++ b/composer.json @@ -79,6 +79,7 @@ }, "require-dev": { "aws/aws-sdk-php": "^3.155", + "composer/composer": "^1.0|^2.0", "doctrine/dbal": "^2.6|^3.0", "filp/whoops": "^2.8", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", diff --git a/src/Illuminate/Foundation/ComposerScripts.php b/src/Illuminate/Foundation/ComposerScripts.php index 6a5f0df49199..dd6adcd20ea2 100644 --- a/src/Illuminate/Foundation/ComposerScripts.php +++ b/src/Illuminate/Foundation/ComposerScripts.php @@ -61,5 +61,9 @@ protected static function clearCompiled() if (is_file($packagesPath = $laravel->getCachedPackagesPath())) { @unlink($packagesPath); } + + if (is_file($configPath = $laravel->getCachedConfigPath())) { + @unlink($configPath); + } } } From 4a22aa476e5001cc2319b7b4c6b7f445b4e3c0c9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 12 Jul 2021 07:19:37 -0500 Subject: [PATCH 2/4] Update ComposerScripts.php --- src/Illuminate/Foundation/ComposerScripts.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Foundation/ComposerScripts.php b/src/Illuminate/Foundation/ComposerScripts.php index dd6adcd20ea2..dc64150bba60 100644 --- a/src/Illuminate/Foundation/ComposerScripts.php +++ b/src/Illuminate/Foundation/ComposerScripts.php @@ -54,6 +54,10 @@ protected static function clearCompiled() { $laravel = new Application(getcwd()); + if (is_file($configPath = $laravel->getCachedConfigPath())) { + @unlink($configPath); + } + if (is_file($servicesPath = $laravel->getCachedServicesPath())) { @unlink($servicesPath); } @@ -61,9 +65,5 @@ protected static function clearCompiled() if (is_file($packagesPath = $laravel->getCachedPackagesPath())) { @unlink($packagesPath); } - - if (is_file($configPath = $laravel->getCachedConfigPath())) { - @unlink($configPath); - } } } From 3cfd3340bcf98600dc4062e8869f0ef9c9dcd7e1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 12 Jul 2021 07:20:01 -0500 Subject: [PATCH 3/4] Apply fixes from StyleCI (#37986) --- src/Illuminate/Foundation/ComposerScripts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/ComposerScripts.php b/src/Illuminate/Foundation/ComposerScripts.php index dc64150bba60..8cf568409138 100644 --- a/src/Illuminate/Foundation/ComposerScripts.php +++ b/src/Illuminate/Foundation/ComposerScripts.php @@ -56,7 +56,7 @@ protected static function clearCompiled() if (is_file($configPath = $laravel->getCachedConfigPath())) { @unlink($configPath); - } + } if (is_file($servicesPath = $laravel->getCachedServicesPath())) { @unlink($servicesPath); From 8c0a54f91250508a17273ab52439afb2a0b48413 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 12 Jul 2021 07:21:28 -0500 Subject: [PATCH 4/4] Update composer.json --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 8d37b2454147..38674f54fd46 100644 --- a/composer.json +++ b/composer.json @@ -79,7 +79,6 @@ }, "require-dev": { "aws/aws-sdk-php": "^3.155", - "composer/composer": "^1.0|^2.0", "doctrine/dbal": "^2.6|^3.0", "filp/whoops": "^2.8", "guzzlehttp/guzzle": "^6.5.5|^7.0.1",