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

Friday, May 20, 2022

[FIXED] How to identify what is preventing Composer from installing latest version of a package?

 May 20, 2022     composer-php, php     No comments   

Issue

I'm using the Composer Dependency Manager for PHP and it won't install the latest version of a package. How can I identify what is holding back composer from installing the latest version?

For example, I have symfony/console in the composer.json versioned as:

"symfony/console": "~3.1",

If I run composer outdated it shows I have symfony/console version 3.1.4 installed, and that version 3.3.5 is available and semver-compatible.

$ composer outdated --no-ansi
symfony/console                    v3.1.4  ! v3.3.5  Symfony Console Component

However, if I perform a dry-run of the update, it will only being me up as far as version 3.2.12.

$ composer update --dry-run --with-dependencies symfony/console
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 2 updates, 0 removals
  - Updating symfony/polyfill-mbstring (v1.2.0) to symfony/polyfill-mbstring (v1.4.0)
  - Installing psr/log (1.0.2)
  - Installing symfony/debug (v3.3.5)
  - Updating symfony/console (v3.1.4) to symfony/console (v3.2.12)

How can I identify what is holding symfony/console back at version 3.2.12 when 3.3.5 is the latest?


Solution

The prohibits or why-not command will show what is blocking a version.

$ composer prohibits symfony/console 3.3.5
symfony/console  v3.3.5 conflicts  symfony/dependency-injection (<3.3)

Documentation here.



Answered By - Courtney Miles
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • 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