Page MenuHomePhabricator

LibUp has to allow the dealerdirect/phpcodesniffer-composer-installer plugin on codesniffer update
Closed, ResolvedPublic

Description

When LibUp upgrades the "mediawiki/mediawiki-codesniffer to version >=43.0.0 the plugin dealerdirect/phpcodesniffer-composer-installer must be accepted.

This can be reached by saying yes to the composer dialog:

Do you trust "dealerdirect/phpcodesniffer-composer-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

Or by adding to composer.json (when missing):

	"config": {
		"allow-plugins": {
			"dealerdirect/phpcodesniffer-composer-installer": true
		}
	}

It is possible that the key config.allow-plugins already exists for other plugins.

Details

TitleReferenceAuthorSource BranchDest Branch
runner: Allow PHPCS pluginrepos/ci-tools/libup!23taaviphpcsmaster
Customize query in GitLab

Event Timeline

According to this, the following should also work (tested locally) and it'd probably be the simplest:

composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true

It wouldn't be many lines of python do handle adding this to basically every repo with codesniffer (possibly with a version check too)...

According to this, the following should also work (tested locally) and it'd probably be the simplest:

composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true

Guessing you'd also want --no-interaction too.

I have upgraded codesniffer on wmf deployed extensions/skins and some libs where autofix changed something or manual fixes are needed. Even with libup these patch sets would need manual attention for review of the autofix.
For the remaining wmf-deployed repos only the bump in composer plus the allow-plugins-change is needed. It would be nice to get this by/leave this to libup as libup is allowed to self-submit these simple patch sets.

taavi claimed this task.