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

Tuesday, February 8, 2022

[FIXED] How to update Laravel Installer "laravel/installer" to latest version?

 February 08, 2022     command-line-interface, composer-php, installation, laravel, php     No comments   

Issue

I tried to update my laravel/installer using the command:

composer global update laravel/installer

But it only upgraded its minor version (assuming that it uses Semantic Versioning).

Package operations: 0 installs, 1 update, 0 removals
  - Updating laravel/installer (v2.1.0 => v2.3.0): Downloading (100%)

Then I execute the update command again:

composer global update laravel/installer

But outputs:

Nothing to install or update

I now uses PHP 7.4.4 (cli) obtained using php -v so I assume that it should be able to upgrade to latest which is Laravel Installer 3.0.1.


Solution

If running composer global update laravel/installer is not enough to upgrade the the desired version, there might be package dependencies that restricts the upgrade to the latest.

I do not know if there is a composer option to do that on global scope but the following commands works for me:

# uninstall the package
composer global remove laravel/installer

# reinstall
composer global require laravel/installer

The 1st process outputs the outdated packages dependencies that are removed with the laravel/installer package.

Then the 2nd process installs the latest laravel/installer with the updates dependencies.

Laravel documentation does not include how to update the installer package yet.


Update: Adding Documentation link on how to update a composer package.

composer require specific version documentation.

php composer.phar require "vendor/package:2.*" vendor/package2:dev-master

As we can see, specific version could be supplied after the colon.

https://getcomposer.org/doc/03-cli.md#require



Answered By - marlo
  • 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