From 00415ba248665f538d98cc7df558661a881f49cb Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Thu, 26 Jan 2023 13:32:57 +0000 Subject: [PATCH 1/3] sync PC name comments from freshly grabbed DB data --- src/services/ProjectConfig.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/ProjectConfig.php b/src/services/ProjectConfig.php index a4143cfb79b..e28526b1eec 100644 --- a/src/services/ProjectConfig.php +++ b/src/services/ProjectConfig.php @@ -1568,7 +1568,8 @@ protected function updateYamlFiles(): void 'except' => ['.*', '.*/'], ]); - $projectConfigNames = $this->getInternalConfig()->get(self::PATH_META_NAMES); + // get fresh internal config so that all the name comments are properly updated + $projectConfigNames = $this->_loadInternalConfig()->get(self::PATH_META_NAMES); $uids = []; $replacements = []; From 8b65c169c92b017303d067b70752cef261800f38 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Thu, 26 Jan 2023 13:39:34 +0000 Subject: [PATCH 2/3] sync PC name comments from freshly grabbed DB data --- src/services/ProjectConfig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/ProjectConfig.php b/src/services/ProjectConfig.php index 1dd8bde35a4..189770be38d 100644 --- a/src/services/ProjectConfig.php +++ b/src/services/ProjectConfig.php @@ -1713,7 +1713,9 @@ private function _updateYamlFiles() 'except' => ['.*', '.*/'], ]); - $projectConfigNames = $this->get(self::CONFIG_NAMES_KEY); + // get fresh internal config so that all the name comments are properly updated + $internalConfigData = $this->_loadInternalConfigData(); + $projectConfigNames = $this->_traverseDataArray($internalConfigData, self::CONFIG_NAMES_KEY); $uids = []; $replacements = []; From f5d9e45fd94fc448f12af2e326670370c8378775 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 2 Feb 2023 16:37:56 -0800 Subject: [PATCH 3/3] Release note --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d987cd7b60f..40131267fac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Fixed a bug where `craft\services\Assets::getAllDescendantFolders()` could return unexpected results for folders that contained an underscore. - Fixed a bug where accessing a custom field’s magic property on an element would return the field’s raw database value rather than `null`, if it didn’t belong to the element’s field layout anymore. ([#12539](https://github.com/craftcms/cms/issues/12539), [#12578](https://github.com/craftcms/cms/pull/12578)) - Fixed a bug where `craft\image\Raster::getIsTransparent()` wasn’t working. ([#12565](https://github.com/craftcms/cms/issues/12565)) +- Fixed a bug where the component name comments in project config YAML files would always lag behind the current project config a little. ([#12576](https://github.com/craftcms/cms/issues/12576), ([#12581](https://github.com/craftcms/cms/pull/12581))) - Added `craft\helpers\Db::escapeForLike()`. - `craft\services\Assets::getAllDescendantFolders()` now has a `$withParent` argument, which can be passed `false` to omit the parent folder from the results. ([#12536](https://github.com/craftcms/cms/issues/12536)) - Deprecated `craft\helpers\DateTimeHelper::timeZoneAbbreviation()`.