Php Composer忽略我的本地repo包,并尝试从远程VCS repo下载它

Php Composer忽略我的本地repo包,并尝试从远程VCS repo下载它,php,git,composer-php,directus,Php,Git,Composer Php,Directus,我正在尝试使用供应商遗留文件夹中的一个软件包 以下是此文件夹的结构: vendor-legacy └── directus ├── oauth2-okta ├── proxy-detection ├── rate-limit └── zend-db 在我的composer.json文件中,我将其声明为: “存储库”:[ { “类型”:“路径”, “url”:“供应商遗留/directus/oauth2 okta” }, { “类型”:“路径”, “url”:“供

我正在尝试使用
供应商遗留
文件夹中的一个软件包

以下是此文件夹的结构:

vendor-legacy
└── directus
    ├── oauth2-okta
    ├── proxy-detection
    ├── rate-limit
    └── zend-db
在我的
composer.json
文件中,我将其声明为:

“存储库”:[
{
“类型”:“路径”,
“url”:“供应商遗留/directus/oauth2 okta”
},
{
“类型”:“路径”,
“url”:“供应商遗留/directus/代理检测”,
“选择”:{
“版本”:{
“directus/代理检测”:“0.5.1”
}
}
},
{
“类型”:“路径”,
“url”:“供应商遗留/directus/费率限制”
}
],
“要求”:{
“directus/oauth2 okta”:“开发大师”,
“directus/代理检测”:“*”,
“directus/速率限制”:“开发主机”,
},
以下是我在
composer更新后得到的信息——忽略平台需求

Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing directus/proxy-detection (0.5.1): Downloading (failed)    Failed to download directus/proxy-detection from dist: The "https://api.github.com/repos/directus/proxy-detection/zipball/e1fd098352dec991bb857e216a099a0758615328" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing directus/proxy-detection (0.5.1): Cloning e1fd098352

                                                                                                                                                                                                                                       
  [RuntimeException]                                                                                                                                                                                                                   
  Failed to execute git clone --no-checkout 'https://***:***@github.com/directus/proxy-detection.git.git' '/Users/owls/unsound-website/unsound-directus/vendor/directus/proxy-detection' && cd '/Users/owls/unsound-website/unsound-d  
  irectus/vendor/directus/proxy-detection' && git remote add composer 'https://***:***@github.com/directus/proxy-detection.git.git' && git fetch composer && git remote set-url origin 'https://github.com/directus/proxy-detection.g  
  it.git' && git remote set-url composer 'https://github.com/directus/proxy-detection.git.git'                                                                                                                                         
                                                                                                                                                                                                                                       
  Cloning into '/Users/owls/unsound-website/unsound-directus/vendor/directus/proxy-detection'...                                                                                                                                       
  remote: Repository not found.                                                                                                                                                                                                        
  fatal: repository 'https://github.com/directus/proxy-detection.git.git/' not found                                                                                                                                                   
                                                                                                                                                                                                                                       

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

使用包信息加载composer存储库
警告https://repo.packagist.org: 您使用的是过时的Composer版本。Composer 2.0现在可用,您应该升级。看见https://getcomposer.org/2
更新依赖项(包括需要开发人员)
包操作:1次安装,0次更新,0次删除
-安装directus/代理检测(0.5.1):下载(失败)无法从以下位置下载directus/代理检测:https://api.github.com/repos/directus/proxy-detection/zipball/e1fd098352dec991bb857e216a099a0758615328“无法下载文件(未找到HTTP/1.1 404)
现在正在尝试从源代码下载
-安装directus/代理检测(0.5.1):克隆e1fd098352
[运行时异常]
无法执行git克隆--无签出“https://***:***@github.com/directus/proxy-detection.git.git”“/Users/owls/unsound-website/unsound-directus/vendor/directus/proxy-detection'&&cd'/Users/owls/unsound-website/unsound-d”
irectus/vendor/directus/proxy-detection'&&git-remote-add-composer'https://***:***@github.com/directus/proxy-detection.git.git'&&git-fetch-composer&&git-remote-set-url-origin'https://github.com/directus/proxy-detection.g  
it.git'&&git远程设置url生成器'https://github.com/directus/proxy-detection.git.git'                                                                                                                                         
克隆到“/Users/owls/unsound-website/unsound-directus/vendor/directus/proxy-detection”。。。
远程:未找到存储库。
致命:存储库'https://github.com/directus/proxy-detection.git.git/”“没有找到
更新[--首选源][--首选区][--干运行][--开发][--无开发][--锁定][--无自定义安装程序][--无自动加载程序][--无脚本][--无进度][--无建议][--有依赖项][--有所有依赖项][v | vv | vvvv | verbose][o |--优化自动加载程序][--类地图权威][--apcu autoloader][--忽略平台需求][--首选稳定的][--首选最低的][i |--交互式][--根需求][--][]。。。

软件包oauth2 okta和rate limit已正确安装,并已符号链接到我的
供应商
文件夹。只有此代理检测似乎存在我不理解的问题。如果有人遇到此问题,我很乐意提供帮助。

我不确定主要问题是什么,但我通过添加以下内容解决了此问题:

    "extra": {
        "branch-alias": {
            "dev-master": "0.5.1"
        }
    },
到代理检测包中的composer.json

然后在root
composer.json中,我所要做的就是将依赖项版本声明为
devmaster

我不知道为什么将版本设置为
0.5.1
会直接导致问题

希望此解决方案将来能帮助他人。

您可能需要将自己的设置为dev