更新时间:2023-01-04 12:50:50
我也在 Github 上发布了这个问题,结果发现文档有点误导.它说:
I posted the issue on Github as well and it turns out that the documentation is a little misleading. It says:
{
"repositories": [
{
"type": "path",
"url": "../../packages/my-package"
}
],
"require": {
"my/package": "*"
}
}
但是,如果您只有一个没有发布的本地 repo,您必须使用:
However, if you just have a local repo without releases, you have to use:
{
"repositories": [
{
"type": "path",
"url": "../../packages/my-package"
}
],
"require": {
"my/package": "dev-master"
}
}
版本 dev-master
是这里的关键(假设您在 master 分支上工作).这有点令人恼火,但感谢一些乐于助人的作曲家贡献者,我终于可以掌握这一点.
The version dev-master
is the key here (given that you are working on the master branch). This was mildly infuriating, but thanks to some helpful composer contributors, I could finally get a grip on this.
我希望这对将来的人有所帮助.
I hope this may help somebody in the future.
祝你好运!