要安装给定软件包的最新开发版本,并克服与您的要求或最低稳定性的冲突错误,我知道我必须创建一个composer.json
文件并将minimum-stability
设置为dev
。
是否可以通过一个相当简单的命令或命令集从命令行授予适当的权限
显然,唯一有--stability
参数的命令是composer init,但它迫使你通过无休止的询问,只有当你要写代码而不是Packagist:时,这种询问才会出现
C:tmpfoo>composer init --stability dev
Welcome to the Composer config generator
This command will guide you through creating your composer.json config.
Package name (<vendor>/<name>) [alvaro.gonzalez/foo]:
Description []:
Author [, n to skip]: n
Minimum Stability [dev]:
Package Type (e.g. library, project, metapackage, composer-plugin) []:
License []:
Define your dependencies.
Would you like to define your dependencies (require) interactively [yes]? no
Would you like to define your dev dependencies (require-dev) interactively [yes]? no
{
"name": "alvaro.gonzalez/foo",
"minimum-stability": "dev",
"require": {}
}
Do you confirm generation [yes]?
C:tmpfoo>
您可以使用composer config minimum-stability dev
完整的onelinercomposer init --name=alvaro.gonzalez/foo --no-interaction; composer config minimum-stability dev