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

Monday, January 24, 2022

[FIXED] Cannot update single Composer package

 January 24, 2022     composer-php, php     No comments   

Issue

My composer.json

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "laravelcollective/html": "~5.0",
    "laravel/cashier": "~5.0",
    "baum/baum": "~1.1",
    "laracasts/flash": "~1.3",
    "intervention/image": "^2.3",
    "toin0u/geocoder-laravel": "@stable",
    "torann/geoip": "0.2.*@dev"
},

My composer show -i

laravel/cashier                       v5.0.14            Laravel Cashier pr...
laravel/framework                     v5.1.29            The Laravel Framew...

Newest Laravel/Cashier version is 6.0.
If I run composer update laravel/cashier I get

Nothing to install or update.

If I modify my composer.json to "laravel/cashier": "~6.0" and run composer install I get

... Lock file is not up to date ... and Nothing to install or update.

What is the recommended way of updating a package and why wouldn't composer update larave/cashier work?


Solution

Running composer update will only update packages within the version constraints you've set in composer.json.

Because you've restricted this package to ~5.0 it won't update to version 6.0.

First update composer.json to ~6.0 then run composer update laravel/cashier.



Answered By - Here2Help
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

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