Since composer 2.2 the setting allow-plugins will be compulsory I’ve tried to push this setting through the composer config command in the CLI but with no luck.
I’ve tried a few commands like:
composer config --json '{"allow-plugins.composer/installers":true, "allow-plugins.dealerdirect/phpcodesniffer-composer-installer": true, "allow-plugins.roots/wordpress-core-installer": true }'composer config config.allow-plugins '{"composer/installers":true, "dealerdirect/phpcodesniffer-composer-installer": true, "wordpress-core-installer": true}'composer config --append "allow-plugins" "composer/installers":true, "dealerdirect/phpcodesniffer-composer-installer": true, "wordpress-core-installer": truecomposer config --json "allow-plugins" '{"composer/installers":true, "dealerdirect/phpcodesniffer-composer-installer": true, "roots/wordpress-core-installer": true }'
All I get is error messages like ".. is not defined" or that it is an invalid value.
What I have is this:
"config": {
"optimize-autoloader": true,
"preferred-install": "dist"
},
And, I need to add the settings like this:
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"roots/wordpress-core-installer": true
}
},
Is this possible through the CLI?