api 由于最低稳定性,无法安装配方

api recipe can't be installed due to minimum-stability

我想在我的启用 flex 的 symfony 应用程序中使用 api-platform/api-platform。为此,我 运行 以下命令:

# creation of the flex-enable symfony application
composer create-project symfony/skeleton:3.3.* sf-flex

# installation of the api recip
composer req api

不幸的是,我收到此错误消息:

[InvalidArgumentException]
无法在您的最低稳定性(稳定)的任何版本中找到包 api-platform/api-pack。检查包拼写或您的最低稳定性

要求[--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update ] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [ --sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []

为了避免这个问题,我尝试了几种解决方案:

解决方案 1

composer create-project symfony/skeleton:3.3.x-dev sf-flex
composer req api

同样的错误

解决方案 2

composer create-project symfony/skeleton:3.3.x-dev sf-flex # a more recent version of symfony/skeleton
composer req --dev api

同样的错误

解决方案 3

我尝试通过如下更改该字段来更新文件 composer.lock

# "minimum-stability": "stable", # has been changed to to dev
"minimum-stability": "dev",

同样的错误

那么,有什么建议吗??

谢谢,

基于此 page,我只是通过添加以下行更改 composer.json

"type": "project",
    "license": "proprietary",
    "minimum-stability": "dev",    // the added line
    "require": {
        "php": "^7.1.3",
// ...

并且 API 配方安装没有问题...