composer icon indicating copy to clipboard operation
composer copied to clipboard

non interactive composer init without questions

Open shyim opened this issue 1 year ago • 1 comments

With NPM you can do:

npm init -y

to skip all questions and just have a package.json.

This does not work with composer (there is obviously no -y)

❯ composer init -n

In InitCommand.php line 153:

  You have to run this command in interactive mode, or specify at least some data using --name, --require, etc.


init [--name NAME] [--description DESCRIPTION] [--author AUTHOR] [--type TYPE] [--homepage HOMEPAGE] [--require REQUIRE] [--require-dev REQUIRE-DEV] [-s|--stability STABILITY] [-l|--license LICENSE] [--repository REPOSITORY] [-a|--autoload AUTOLOAD]

When running it interactively it suggest a composer name, can't we just use that for non interactive

shyim avatar Nov 07 '24 09:11 shyim

Maybe.. Feel free to PR

Seldaek avatar Nov 14 '24 13:11 Seldaek