LARAGON – Update Composer

1. Introduction

In Laragon, updating Composer to its latest version is easy.

You can upgrade or downgrade Composer in the terminal window.

2. Currently installed Composer version?

  • Open a terminal window by clicking the Terminal button in the Laragon Button Menu.
  • If necessary, go to the folder \LARAGON\bin\composer\.
  • Then enter composer -V to get the exact composer version installed.

3. Laragon - Updating Composer

  • Open a terminal window by clicking the Terminal button in the Laragon Button Menu.
  • If necessary, go to the folder \LARAGON\bin\composer\.
  • Enter composer self-update to update composer to its latest stable version.
  • If your application uses packages that require composer version 1, then you can update composer to the latest stable version 1.x.x by using the command composer self-update --1.
  • After forcing the composer self-update routine into a specific branch, the routine will stay in that branch the next times you’ll use composer self-update.
  • To force composer to update to another branch, you’ll have to specify it during update, for instance composer self-update --2.
  • To force composer to update to the latest stable version in the latest branch, use composer self-update --stable.

You can always undo an up- or downgrade by using composer self-update --rollback.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.