我有Symfony Demo Application运行,现在我正在尝试install API Platform as a standalone bundle.
我正在使用PHP 7.0.10和最新的作曲家,但我之前的测试是使用PHP 5.6.20.
当我尝试添加API平台核心作为依赖项时,我收到以下错误消息:
$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.
解决方法:
在您的composer.json文件中:
找:
"symfony/symfony": "3.2.*",
用…来代替:
"symfony/symfony": "3.3.*",
…要么:
"symfony/symfony": "^3.2.*",
您可能需要(想要)首先运行composer update,然后使用composer require api-platform / core添加您的api-platform软件包,以便正确加载所有依赖项,但这不是必需的.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。