From 5ab87acafee9ca2410fc494047d814757f3f64c8 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sun, 2 Feb 2025 12:24:05 -0800 Subject: [PATCH] Cleanup [ci skip] --- src/services/Plugins.php | 10 +++++----- src/services/Updates.php | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/services/Plugins.php b/src/services/Plugins.php index 48429e023ad..7c1ee9409a2 100644 --- a/src/services/Plugins.php +++ b/src/services/Plugins.php @@ -853,12 +853,12 @@ public function updatePluginVersionInfo(PluginInterface $plugin): void $this->_storedPluginInfo[$plugin->id]['version'] = $plugin->getVersion(); $this->_storedPluginInfo[$plugin->id]['schemaVersion'] = $plugin->schemaVersion; } - - $key = ProjectConfig::PATH_PLUGINS . ".$plugin->id.schemaVersion"; - // the ProjectConfig->_setInternal() method will take care of checking if the value has changed - // and will only perform the update if it has - Craft::$app->getProjectConfig()->set($key, $plugin->schemaVersion, "Update plugin schema version for “{$plugin->handle}”"); + Craft::$app->getProjectConfig()->set( + sprintf('%s.%s.schemaVersion', ProjectConfig::PATH_PLUGINS, $plugin->id), + $plugin->schemaVersion, + "Update plugin schema version for “{$plugin->handle}”", + ); } /** diff --git a/src/services/Updates.php b/src/services/Updates.php index 2b1030c9736..e3ec4c2b171 100644 --- a/src/services/Updates.php +++ b/src/services/Updates.php @@ -363,9 +363,11 @@ public function updateCraftVersionInfo(): bool Craft::$app->saveInfo($info); - // the ProjectConfig->_setInternal() method will take care of checking if the value has changed - // and will only perform the update if it has - Craft::$app->getProjectConfig()->set(ProjectConfig::PATH_SCHEMA_VERSION, $info->schemaVersion, 'Update Craft schema version'); + Craft::$app->getProjectConfig()->set( + ProjectConfig::PATH_SCHEMA_VERSION, + $info->schemaVersion, + 'Update Craft schema version', + ); $this->_isCraftUpdatePending = null;