简体   繁体   English

Composer将依赖项更新到较旧的版本

[英]Composer updates a dependency to an older version

I regularly run composer update in my project and then check what dependencies were updated. 我在项目中定期运行composer update ,然后检查更新了哪些依赖项。 But today I noticed a strange output: 但是今天我注意到一个奇怪的输出:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
  - Updating phpdocumentor/type-resolver (0.4.0 => 0.3.0): Downloading (100%)
  - Updating phpdocumentor/reflection-docblock (3.2.0 => 3.2.1): Downloading (100%)
Writing lock file

You can see that the phpdocumentor/type-resolver package was downgraded from 0.4.0 to 0.3.0, though the command was update . 您可以看到phpdocumentor / type-resolver软件包已从0.4.0降级到0.3.0,尽管该命令是update Is it normal or a bug or whatever? 这是正常现象还是漏洞或其他原因?

It seems I've found the answer. 看来我找到了答案。 It is in this commit: Downgrade phpdocumentor/type-resolver to 0.3 它是在此提交中:将phpdocumentor / type-resolver降级到0.3

In order to restore a bc break made in 3.2.0 I downgraded the type-resolver. This makes the version less compatible with php 7.1 But will help our users to upgrade.

Indeed phpdocumentor/type-resolver is a dependency of phpdocumentor/reflection-docblock and its maintainer deliberately downgraded the type-resolver. 的确,phpdocumentor / type-resolver是phpdocumentor / reflection-docblock的依赖项,其维护者故意降级了type-resolver。 So everything's normal. 所以一切正常。 And it's not a composer bug. 这不是作曲家的错误。 It was just the first time I saw such a behavior, that's why I found it strange. 这只是我第一次看到这样的行为,这就是为什么我发现它很奇怪。

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

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