Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
brandonkelly committed Feb 2, 2025
1 parent e5301e9 commit 5ab87ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/services/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
);
}

/**
Expand Down
8 changes: 5 additions & 3 deletions src/services/Updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5ab87ac

Please sign in to comment.