[英]Root composer.json requires package dev-develop, found package but it does not match the constraint
I forked a GitHub repo foo/bar that I want to install using composer.我分叉了一个 GitHub 存储库 foo/bar,我想使用 composer 安装它。
I added我添加了
{
"require": {
foo/bar": "dev-develop"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/myuser/bar"
}
]
}
My bar
fork has a branch develop
.我的bar
fork 有一个分支develop
。 When I run composer install
, I get:当我运行composer install
时,我得到:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires foo/bar dev-develop, found foo/bar[dev-main, v0.1.0] but it does not match the constraint.
I had the same problem with gitlab.我对 gitlab 有同样的问题。 I needed to publish a composer package with the name of my feature branch.我需要以我的功能分支的名称发布一个作曲家 package。 You should try that.你应该试试。
Composer cannot find the develop
branch. Composer 找不到develop
分支。 It did find the main
branch and tag v0.1.0
, but no develop
.它确实找到了main
分支和标签v0.1.0
,但没有找到develop
。
found foo/bar[dev-main, v0.1.0]找到 foo/bar[dev-main, v0.1.0]
Check that composer is really looking at your forked repo:检查作曲家是否真的在查看您的分叉回购:
composer require -vvv "foo/bar dev-develop"
and look for some output that shows it looked into your fork of foo/bar.并寻找一些 output 显示它查看了您的 foo/bar 叉。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.