PHP 7.3 reached end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in September 2022. You may want to consider planning your upgrade now to Adobe Commerce 2.4.x and PHP 7.4.x to help maintain PCI compliance.

Add or update components

A contributing developer updates components by specifying components and their versions in Magento’s composer.json.

To update components if you’re not a contributing developer, see Updating the Magento application and components.

You can either add a require section to composer.json or you can use the composer require command as follows:

  1. Log in to the Magento server, or switch to, the file system owner.
  2. Change to the directory to which you cloned the Magento application. For example,

    cd /var/www/magento2

You have the following options:

Get available module versions

Command usage:

composer show --all <vendor>/<name>

For example,

composer show --all example/module

Use the composer require command to install

Command usage:

composer require <vendor>/<name>:<version>

For example:

composer require example/module:1.0.0

Wait while Composer updates dependencies and installs the component.

Add a require section to composer.json

Open composer.json in a text editor.

Add a require section like the following:

"require": {
  "<vendor>/<name>": "<version>",
  "<vendor>/<name>": "<version>"

Save your changes to composer.json, exit the text editor, and enter composer update

Related topics

If you have issues, see Composer troubleshooting.

If you have issues, see Composer troubleshooting.