简体   繁体   中英

Composer updates a dependency to an older version

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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