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 中的请求之间持久化对象 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01