From b08d6a4b9d52edbec4173febf6997fbdc5397e8a Mon Sep 17 00:00:00 2001 From: Anand Capur Date: Sat, 7 Oct 2017 14:45:31 -0700 Subject: [PATCH] Make config caching less aggressive --- .../Commands/Environment/AppSettingsCommand.php | 1 - .../Commands/Environment/DatabaseSettingsCommand.php | 1 - .../Commands/Environment/EmailSettingsCommand.php | 1 - composer.json | 12 ++---------- .../Environment/EmailSettingsCommandTest.php | 1 - 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/app/Console/Commands/Environment/AppSettingsCommand.php b/app/Console/Commands/Environment/AppSettingsCommand.php index d3e63af37..95591ac6f 100644 --- a/app/Console/Commands/Environment/AppSettingsCommand.php +++ b/app/Console/Commands/Environment/AppSettingsCommand.php @@ -114,7 +114,6 @@ class AppSettingsCommand extends Command $this->checkForRedis(); $this->writeToEnvironment($this->variables); - $this->command->call('config:cache'); $this->info($this->command->output()); } diff --git a/app/Console/Commands/Environment/DatabaseSettingsCommand.php b/app/Console/Commands/Environment/DatabaseSettingsCommand.php index d012971bd..f99c155be 100644 --- a/app/Console/Commands/Environment/DatabaseSettingsCommand.php +++ b/app/Console/Commands/Environment/DatabaseSettingsCommand.php @@ -122,7 +122,6 @@ class DatabaseSettingsCommand extends Command $this->writeToEnvironment($this->variables); - $this->console->call('config:cache'); $this->info($this->console->output()); return 0; diff --git a/app/Console/Commands/Environment/EmailSettingsCommand.php b/app/Console/Commands/Environment/EmailSettingsCommand.php index c5cb609b1..61b922b76 100644 --- a/app/Console/Commands/Environment/EmailSettingsCommand.php +++ b/app/Console/Commands/Environment/EmailSettingsCommand.php @@ -92,7 +92,6 @@ class EmailSettingsCommand extends Command $this->writeToEnvironment($this->variables); $this->line('Updating stored environment configuration file.'); - $this->call('config:cache'); $this->line(''); } diff --git a/composer.json b/composer.json index db04ade72..b0b0265bc 100644 --- a/composer.json +++ b/composer.json @@ -68,21 +68,13 @@ } }, "scripts": { - "pre-install-cmd": [ - "rm -f bootstrap/cache/services.php bootstrap/cache/compiled.php" - ], - "pre-update-cmd": [ - "rm -f bootstrap/cache/services.php bootstrap/cache/compiled.php" - ], "post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall", - "php artisan optimize", - "php artisan config:cache" + "php artisan optimize" ], "post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", - "php artisan optimize", - "php artisan config:cache" + "php artisan optimize" ] }, "prefer-stable": true, diff --git a/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php b/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php index ec8d943e9..1be2e50cb 100644 --- a/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php +++ b/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php @@ -276,6 +276,5 @@ class EmailSettingsCommandTest extends CommandTestCase { $this->config->shouldReceive('get')->withAnyArgs()->zeroOrMoreTimes()->andReturnNull(); $this->command->shouldReceive('writeToEnvironment')->with($data)->once()->andReturnNull(); - $this->command->shouldReceive('call')->with('config:cache')->once()->andReturnNull(); } }