PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, January 21, 2022

[FIXED] Composer updates a dependency to an older version

 January 21, 2022     composer-php, php     No comments   

Issue

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?


Solution

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.



Answered By - Ilyich
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing