我已经启动并运行了Symfony Demo Application,现在我正在尝试install API Platform as a standalone bundle。
我使用的是PHP 7.0.10和最新的composer,但我之前的测试使用的是PHP 5.6.20。
当我尝试添加API Platform Core作为依赖项时,我得到以下错误消息:
$ composer require api-platform/core
Using version ^1.1 for api-platform/core
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/symfony (locked at v3.2.8, required as ^3
.2) -> satisfiable by symfony/symfony[v3.2.8].
- api-platform/core v1.1.0 requires phpdocumentor/reflection ^1.0.7 -> satis
fiable by phpdocumentor/reflection[1.0.7].
- api-platform/core v1.1.1 requires phpdocumentor/reflection ^1.0.7 -> satis
fiable by phpdocumentor/reflection[1.0.7].
- Conclusion: don't install phpdocumentor/reflection 1.0.7
- Installation request for api-platform/core ^1.1 -> satisfiable by api-plat
form/core[v1.1.0, v1.1.1].
Installation failed, reverting ./composer.json to its original content.发布于 2017-05-20 04:52:42
在composer.json文件中:
查找:
"symfony/symfony": "3.2.*",替换为:
"symfony/symfony": "3.3.*",...or:
"symfony/symfony": "^3.2.*",您可能需要(希望)首先运行composer update,然后使用composer require api-platform/core添加api-platform包,以便正确加载所有依赖项,但这并不是必需的。
https://stackoverflow.com/questions/44077547
复制相似问题