From 2e908b66b8989a985727e5a84c8a49d8e6d0a4a2 Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Wed, 17 Jul 2024 16:29:34 -0400 Subject: [PATCH] [5.x] Clarify difference between `default()` and `getFallbackConfig()` site methods (#10470) --- src/Sites/Sites.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sites/Sites.php b/src/Sites/Sites.php index 40c6ac6665..717ed3ad7f 100644 --- a/src/Sites/Sites.php +++ b/src/Sites/Sites.php @@ -129,10 +129,10 @@ protected function getSavedSites() { return File::exists($sitesPath = $this->path()) ? YAML::file($sitesPath)->parse() - : $this->getDefaultSite(); + : $this->getFallbackConfig(); } - protected function getDefaultSite() + protected function getFallbackConfig() { return [ 'default' => [ @@ -149,6 +149,7 @@ public function save() $newSites = $this->getNewSites(); $deletedSites = $this->getDeletedSites(); + // Save sites to store $this->saveToStore(); // Dispatch our tracked `SiteCreated` and `SiteDeleted` events @@ -161,7 +162,6 @@ public function save() protected function saveToStore() { - // Save to file File::put($this->path(), YAML::dump($this->config())); }