composer/composer — pull request #3290 by boombatower (2014-09-21 05:27:05+00:00)
Title: Allow packagist to be disabled via the config command.

Currently there is no equivalent to disable packagist via config as can be done via `composer.json` and documented (https://getcomposer.org/doc/05-repositories.md#disabling-packagist).

{
"repositories": [
{
"packagist": false
}
]
}

Currently packagist is displayed like any other repository, but cannot be unset and setting to `false` as done in composer.json is not possible via the command line, but can be done manually and works as expected.

$ composer config --global --list
[repositories.packagist.type] composer
[repositories.packagist.url] https?://packagist.org
[repositories.packagist.allow_ssl_downgrade] true
...

Attempting to unset does not provide an error, but has not effect.

$ config --global --unset repositories.packagist

This pull request allows for packagist to be disabled using either of the following.

composer config --global --unset repositories.packagist
composer config --global repositories.packagist false

Once set everything behaves as expected and `--list` does not display packagist.