I have an issue when I create a new composer package.
For instance when I start creating the package, I create an empty folder and then I run composer init.
Then, Composer propose me already a default value for the Package name.
In this case:
Package name (<vendor>/<name>) [namesurname/testdirectory]
But since in Github my username has a - in between. I need to change my vendor name from namesurname to name-surname.
I'm checking on the composer documentation if there is a setting in the composer configuration to change the vendor name but I cannot find anything about.
How can I change it?
You may use COMPOSER_DEFAULT_VENDOR
environment variable to set default vendor name:
export COMPOSER_DEFAULT_VENDOR=name-surname
composer init
You may add export COMPOSER_DEFAULT_VENDOR=name-surname
to your .bashrc
to make it permanent.
AFAIK it is undocumented, but it was implemented in this PR.
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