Page MenuHomePhabricator

UpdateExtensionJsonSchema doesn't remove _merge_strategy
Closed, ResolvedPublic

Description

Even though there is the unset() call, it doesn't remove it

			foreach ( $config as $name => $value ) {
				if ( $name[0] !== '@' ) {
					$json['config'][$name] = [ 'value' => $value ];
					if ( isset( $value[ExtensionRegistry::MERGE_STRATEGY] ) ) {
						$json['config'][$name]['merge_strategy'] = $value[ExtensionRegistry::MERGE_STRATEGY];
						unset( $value[ExtensionRegistry::MERGE_STRATEGY] );
					}
					if ( isset( $config["@$name"] ) ) {
						// Put 'description' first for better human-legibility.
						$json['config'][$name] = array_merge(
							[ 'description' => $config["@$name"] ],
							$json['config'][$name]
						);
					}
				}
			}

Event Timeline

Reedy created this task.May 12 2020, 6:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 12 2020, 6:12 PM
Legoktm claimed this task.May 12 2020, 6:30 PM

Change 596024 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/core@master] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596024

Change 596031 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/core@REL1_31] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596031

Change 596032 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/core@REL1_33] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596032

Change 596033 had a related patch set uploaded (by Reedy; owner: Legoktm):
[mediawiki/core@REL1_34] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596033

Reedy closed this task as Resolved.May 12 2020, 7:31 PM

Change 596031 merged by jenkins-bot:
[mediawiki/core@REL1_31] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596031

Change 596032 merged by jenkins-bot:
[mediawiki/core@REL1_33] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596032

Change 596033 merged by jenkins-bot:
[mediawiki/core@REL1_34] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596033

Change 596024 merged by jenkins-bot:
[mediawiki/core@master] registration: Fix upgradeExtensionJsonSchema to remove _merge_strategy

https://gerrit.wikimedia.org/r/596024