Skip to content

non interactive composer init without questions #12189

@shyim

Description

@shyim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions