we can list all available composer packages by running
composer show -a
and it shows all the packages available on packagist... but in my composer.json
I have the folowing configuration:
...
"repositories": [
{
"type": "git",
"url": "https://bitbucket.org/........."
}
]
...
so I was expecting that composer show -a
was looking for all the packages available in all the repositories defined inside the composer.json file but in this case it shows me all the packages available at packagist even if I didn't included it... how can I list all the available packages at this bitbucket address that I addded in my composer.json file?
You can run composer show -i (short for --installed ). In the latest version just use composer show .
Composer will look in all your repositories to find the packages your project requires. By default, only the Packagist.org repository is registered in Composer. You can add more repositories to your project by declaring them in composer.
You need to use --all
switch instead of -a
(--available
):
composer show --all
--all
: List all packages available in all your repositories.https://getcomposer.org/doc/03-cli.md#show
You can disable packagist.org
and use composer show --all
{
"repositories": [
{
"packagist.org": false
}
]
}
https://getcomposer.org/doc/05-repositories.md#disabling-packagist-org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With