【发布时间】:2018-02-23 07:38:47
【问题描述】:
我知道这个问题已经被问过好几次了,但其他解决方案对我不起作用,所以问题可能出在其他地方。
在一个依赖项目中,我需要一个这样的包:
"require": {
"drupal/security_review": "dev-8.x-1.x#35ebae44"
}
但是composer update 失败的原因是:
package/name dev-master requires drupal/security_review dev-8.x-1.x#35ebae44
-> no matching package found.
出于研究目的,我获取了包裹信息:
[local]$ composer show --all drupal/security_review
name : drupal/security_review
descrip. : Site security and configuration review module.
keywords :
versions : 1.x-dev, dev-1.x
type : drupal-module
source : [git] https://git.drupal.org/project/security_review 9a3bdf82a645dabb9801f73d2d76acf8c3081d88
support
source : http://cgit.drupalcode.org/security_review
requires
drupal/core ~8.0
然后尝试使用版本代替分支,因为它作为前缀从版本中省略了“dev-”部分:
"require": {
"drupal/security_review": "dev-1.x#35ebae44"
}
这不一样了:
[local]$ composer update
...
- Installing drupal/security_review (dev-1.x 9a3bdf8): Cloning 9a3bdf82a6
如您所见,它获取提交 #9a3bdf8 而不是请求的 - #35ebae44。
有什么想法吗?
【问题讨论】:
标签: composer-php drupal-8