I'm having difficulty getting the PHP client libraries package for Windows Azure via Composer. The problem would appear to be around Pear dependencies the package has.
我很难通过Composer获取Windows Azure的PHP客户端库包。这个问题似乎与包有Pear依赖关系有关。
The contents of the composer.json file:
composer.json文件的内容:
{
"require": {
"microsoft/windowsazure": "dev-dev"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
]
}
The output following running "composer update" reads:
运行“composer update”后的输出如下:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for microsoft/windowsazure dev-dev -> satisfiable by microsoft/windowsazure[dev-dev].
- microsoft/windowsazure dev-dev requires pear-pear/http_request2 * -> no matching package found.
I've never experienced any difficulty getting this package in the past. I can provide more verbose logs on request.
我过去从未遇到任何困难。我可以根据要求提供更详细的日志。
2 个解决方案
#1
11
I recall seeing a few issues raised due to changes in how replaces
works in regards to pear bridging.
我记得有些问题是由于梨替换工作方式的变化而引起的。
This issue needs to be fixed upstream to have pear-pear/*
replaced with pear-pear.php.net/*
, but as a workaround in your root composer.json
you can explicitly require the dependencies in order to have them discovered by the solver.
这个问题需要在上游修复,以使pear-pear / *替换为pear-pear.php.net/*,但作为root composer.json中的一种解决方法,您可以明确要求依赖项,以便让它们被发现求解。
{
"require": {
"microsoft/windowsazure": "dev-dev",
"pear-pear.php.net/http_request2": "*",
"pear-pear.php.net/mail_mime": "*",
"pear-pear.php.net/mail_mimedecode": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
]
}
The above composer.json
should work in the latest and future versions of composer. Tested with Composer version aa9c257f0efd1a54c93ba95282821a497bc15d75 2014-03-09 15:09:15
上面的composer.json应该适用于作曲家的最新版本和未来版本。使用Composer版本测试aa9c257f0efd1a54c93ba95282821a497bc15d75 2014-03-09 15:09:15
#2
0
This is a composer bug, I fixed it by using an older version of composer. Your composer.json
is fine. The version I used was:
这是一个作曲家的错误,我通过使用旧版本的作曲家来修复它。你的composer.json很好。我使用的版本是:
Composer version 42c496752ab6ec6c45b185b70c8c39220da01b1c
https://github.com/composer/composer/archive/42c496752ab6ec6c45b185b70c8c39220da01b1c.zip
https://github.com/composer/composer/archive/42c496752ab6ec6c45b185b70c8c39220da01b1c.zip
#1
11
I recall seeing a few issues raised due to changes in how replaces
works in regards to pear bridging.
我记得有些问题是由于梨替换工作方式的变化而引起的。
This issue needs to be fixed upstream to have pear-pear/*
replaced with pear-pear.php.net/*
, but as a workaround in your root composer.json
you can explicitly require the dependencies in order to have them discovered by the solver.
这个问题需要在上游修复,以使pear-pear / *替换为pear-pear.php.net/*,但作为root composer.json中的一种解决方法,您可以明确要求依赖项,以便让它们被发现求解。
{
"require": {
"microsoft/windowsazure": "dev-dev",
"pear-pear.php.net/http_request2": "*",
"pear-pear.php.net/mail_mime": "*",
"pear-pear.php.net/mail_mimedecode": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
]
}
The above composer.json
should work in the latest and future versions of composer. Tested with Composer version aa9c257f0efd1a54c93ba95282821a497bc15d75 2014-03-09 15:09:15
上面的composer.json应该适用于作曲家的最新版本和未来版本。使用Composer版本测试aa9c257f0efd1a54c93ba95282821a497bc15d75 2014-03-09 15:09:15
#2
0
This is a composer bug, I fixed it by using an older version of composer. Your composer.json
is fine. The version I used was:
这是一个作曲家的错误,我通过使用旧版本的作曲家来修复它。你的composer.json很好。我使用的版本是:
Composer version 42c496752ab6ec6c45b185b70c8c39220da01b1c
https://github.com/composer/composer/archive/42c496752ab6ec6c45b185b70c8c39220da01b1c.zip
https://github.com/composer/composer/archive/42c496752ab6ec6c45b185b70c8c39220da01b1c.zip