我想在支持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-sugges] [--no-update] [ - no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-包] [-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",
相同错误
那么,任何建议??
谢谢,
答案 0 :(得分:0)
根据此page,我刚刚通过添加以下行来更改composer.json
:
"type": "project",
"license": "proprietary",
"minimum-stability": "dev", // the added line
"require": {
"php": "^7.1.3",
// ...
安装API配方没有问题......