简体   繁体   English

PHP 作曲家安装与 GitHub 不同的文件版本

[英]PHP composer install different files version than GitHub

I tried to install this package: https://github.com/reactphp/filesystem from composer 2.0.13 using this command:我尝试使用以下命令从 composer 2.0.13 安装此 package: https://github.com/reactphp/filesystem

composer require react/filesystem:^0.1.2

Which is the latest current version of this GitHub package.这是 GitHub package 的最新当前版本。

But for some reason the files content that I'm getting is far different than the one on GitHub, It lacks lots of functions.但由于某种原因,我得到的文件内容与 GitHub 上的文件内容大不相同,它缺少很多功能。

It makes me wondered if any of my other composer packages are truely updated.. As for right now I clone it manualy but what makes composer clone a diffrent files?这让我想知道我的其他作曲家包是否真的更新了。至于现在我手动克隆它,但是是什么让作曲家克隆了不同的文件?

I tired clearing cache, re-Install, ignore platform requirements and update both composer and packages.我厌倦了清除缓存、重新安装、忽略平台要求并更新作曲家和软件包。

You required a stable version of this package, and got the v0.1.2 .您需要此 package 的稳定版本,并获得v0.1.2 Composer package versions usually correspond to Git tags . Composer package 版本通常对应Git 标签 If you look at the repository tags , you can see that v0.1.2 is commit 766cdef from 27 Oct 2018 .如果查看存储库标签,您可以看到v0.1.2是从2018 年 10 月 27 日提交的766cdef

On the repository front page you see the code in its latest version (last commit of main branch), which actually is fc89dc2 committed on 8 May 2020 .存储库首页上,您会看到最新版本的代码(主分支的最后一次提交),实际上是fc89dc22020 年 5 月 8 日提交的。

The missing code you are talking about probably isn't released yet and may be unstable.您正在谈论的缺失代码可能尚未发布并且可能不稳定。

If you still want to install the latest version (there are good reasons for that), change the minimum-stability of your composer.json to dev and require the dev-master version of the package.如果您仍想安装最新版本(有充分的理由),请将composer.jsonminimum-stability更改为dev并需要 package 的dev-master版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM