duanfazhun0383 2017-08-05 14:05
浏览 990
已采纳

Composer将依赖项更新为旧版本

I regularly run composer update in my project and then check what dependencies were updated. 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. Is it normal or a bug or whatever?

  • 写回答

1条回答 默认 最新

  • dongpouda6700 2017-08-05 14:54
    关注

    It seems I've found the answer. It is in this commit: Downgrade phpdocumentor/type-resolver to 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. 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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?