Composer doesn#39;t find local vcs dependency(Composer 找不到本地 vcs 依赖项)
问题描述
我有一个项目依赖于一个本地包,它本身依赖于另一个本地包.
项目
<前>{...存储库":[{包装师":假},{类型":vcs","url": "/path/to/local/package1"},],要求": {本地/package1":开发主机"}...}套餐一
<前>{...存储库":[{包装师":假},{类型":vcs","url": "/path/to/local/package2"},],要求": {本地/package2":开发大师"}...}当我在 package1
上执行 composer install
时,一切正常,packages2
被找到并安装.但是当我在 project
上执行此操作时,它找不到 package2
并出现此错误:
来自 Composer 手册:
<块引用>存储库仅适用于根包和您的依赖项中定义的存储库将不会被加载.如果需要,请阅读 常见问题解答条目了解原因.
I have a project that depends on a local package which in itself depends on another local pakcage.
Project
{ ... "repositories": [ { "packagist": false }, { "type": "vcs", "url": "/path/to/local/package1" }, ], "require": { "local/package1": "dev-master" } ... }
Package 1
{ ... "repositories": [ { "packagist": false }, { "type": "vcs", "url": "/path/to/local/package2" }, ], "require": { "local/package2": "dev-master" } ... }
When I do a composer install
on package1
, everything works as expected, packages2
is found and is installed. But when I do it on project
it cannot find package2
with this error:
Problem 1 - Installation request for local/package1 dev-master -> satisfiable by local/package1[dev-master]. - local/package1 dev-master requires local/package2 dev-master -> no matching package found.
From Composer manual:
Repositories are only available to the root package and the repositories defined in your dependencies will not be loaded. Read the FAQ entry if you want to learn why.
这篇关于Composer 找不到本地 vcs 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Composer 找不到本地 vcs 依赖项
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- Laravel 仓库 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01