Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default config for namespace and author #11243

Open
Schrank opened this issue Dec 26, 2022 · 1 comment
Open

Set default config for namespace and author #11243

Schrank opened this issue Dec 26, 2022 · 1 comment

Comments

@Schrank
Copy link

Schrank commented Dec 26, 2022

I just created a composer.json file via composer init and was wondering how I can set default values for the package namespace and the author. I read the documentation, but couldn't find anything about it. Obviously it is read somewhere, where? 😅 I would like to change it.

I see a ton of options here, but is anything of this set via global config? If yes I'm happy to add documentation, if not I'm happy to add a PR for it :-)
https://github.com/composer/composer/blob/main/src/Composer/Command/InitCommand.php#L272-L292

Same for the author:
https://github.com/composer/composer/blob/main/src/Composer/Command/InitCommand.php#L321-L337

So if I'm correct, it should be documented here:

https://getcomposer.org/doc/03-cli.md#environment-variables

and should work like the other env vars, correct? Then I would provide a PR with a couple of lines description and add COMPOSER_DEFAULT_VENDOR and COMPOSER_DEFAULT_AUTHOR .

-> % composer init

  Welcome to the Composer config generator

This command will guide you through creating your composer.json config.

Package name (<vendor>/<name>) [fabian/shopify-tools]: winkelwagen/shopify-tools
Description []:
Author [Fabian Blechschmidt <blechschmidt@fabian-blechschmidt.de>, n to skip]:
@Seldaek
Copy link
Member

Seldaek commented May 7, 2023

Yes a PR for the docs would be great. I'd add these to 03-cli and ref them in the init docs as it is really specific to that command.

@Seldaek Seldaek added this to the Nice To Have milestone May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants