我在localhost(xamp)上,并试图与作曲家一起根据Facebook SDK for PHP包含facebook graph-sdk。使用composer require facebook/graph-sdk
后出现以下错误:
Problem 1
- Installation request for facebook/graph-sdk ^6.0@dev -> satisfiable by facebook/graph-sdk[6.x-dev].
- facebook/graph-sdk 6.x-dev requires php-http/client-implementation ^1.0 -> no matching package found.
好的,所以我使用了谷歌,发现需要像"虚拟包"这样的东西来实现。据说它通常是php-http/guzzle6-adapter
或php-http/curl-client
.由于Facebook SDK for PHP说:"将Facebook SDK与Guzzle 6.x一起使用时存在问题。我选择了 Curle 客户端。
composer require php-http/httplug-bundle php-http/curl-client
这导致我再次尝试安装Facebook SDK以更多错误告终。
Problem 1
- Installation request for facebook/graph-sdk ^6.0@dev -> satisfiable by facebook/graph-sdk[6.x-dev].
- Conclusion: remove php-http/httplug 2.0.x-dev
- Conclusion: don't install php-http/httplug 2.0.x-dev
所以我删除了它。 composer remove php-http/httplug 2.0.x-dev
但与以前的尝试没有区别。
我很困惑。如何安装脸书图形SDK?
编辑:
composer.json 文件:
{
"name": "tomas/tmvdev",
"description": "wordpress theme",
"keywords": ["WordPress", "Theme"],
"homepage": "https://github.com/vavra7/tmvdev",
"type": "project",
"license": "GNU",
"authors": [
{
"name": "Tomáš Vavřinka",
"email": "email@tomasvavrinka.cz",
"homepage": "http://tomasvavrinka.cz"
}
],
"minimum-stability": "dev",
"require": {
"php-http/curl-client": "^2.0@dev"
},
"autoload": {
"psr-4": {"Inc\": "./inc"}
}
}
问题是 composer.json 文件中的语句:"minimum-stability": "dev"
。作曲家尝试下载版本facebook/graph-sdk ^6.0@dev
该版本不是稳定版本。