cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade a specific extension from composer

SOLVED

Upgrade a specific extension from composer

Hi

 

We need to upgrade a specific extension using composer, as the extension is inside vendor folder.

 

Would you tell me the right way to do it?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Upgrade a specific extension from composer

Hi ,

You can upgrade an extension using following way:

Upgrade an extension

You should have a branch to work in when updating your extension. These instructions use composer to update the files. Before you continue, you must:

Know the extension’s Composer name and version
Know the extension is compatible with your project and Magento Commerce Cloud version. In particular, check the required PHP version.
To update an extension:

If you haven’t done so already, change to your environment root directory.
Open composer.json in a text editor.
Locate your extension and update the version.
Save your changes to composer.json and exit the text editor.
Update project dependencies:

composer update
Enter the following commands in the order to commit the changes and deploy the project, including composer.lock:

git add -A
git commit -m "<MESSAGE>"
git push origin <ENVIRONMENT id="">
Wait for the project to deploy and verify in your environment.
If there are errors, see Component deployment failure.

For more info, you can magento document for it.

https://devdocs.magento.com/guides/v2.3/cloud/howtos/install-components.html

As summary: basically you need to your new version to composer and run composer update...


I hope it will help you!

View solution in original post

4 REPLIES 4

Re: Upgrade a specific extension from composer

You should upgrade extension using composer.

 

See composer.json file on the root of the extension to find the package name.

 

Run the composer update command line to upgrade:

 

Example:

composer update vendor/extension

 

Thanks

 

 

Re: Upgrade a specific extension from composer

Hi ,

You can upgrade an extension using following way:

Upgrade an extension

You should have a branch to work in when updating your extension. These instructions use composer to update the files. Before you continue, you must:

Know the extension’s Composer name and version
Know the extension is compatible with your project and Magento Commerce Cloud version. In particular, check the required PHP version.
To update an extension:

If you haven’t done so already, change to your environment root directory.
Open composer.json in a text editor.
Locate your extension and update the version.
Save your changes to composer.json and exit the text editor.
Update project dependencies:

composer update
Enter the following commands in the order to commit the changes and deploy the project, including composer.lock:

git add -A
git commit -m "<MESSAGE>"
git push origin <ENVIRONMENT id="">
Wait for the project to deploy and verify in your environment.
If there are errors, see Component deployment failure.

For more info, you can magento document for it.

https://devdocs.magento.com/guides/v2.3/cloud/howtos/install-components.html

As summary: basically you need to your new version to composer and run composer update...


I hope it will help you!

Re: Upgrade a specific extension from composer

Hi @Vimal Kumar @ChandrakeshK ,

 

Thanks for your replies.

 

I have accidentaly updated the extension by changing the version and running 'bin/magento setup:upgrade' on a testing site.

 

As this is using GitHub we don't really change files on their live site.

 

There is no files under 'vendor' folder on the repository.

 

Should we do the same on the live site? I am worried about down time.

 

 

 

Re: Upgrade a specific extension from composer

Hi @mlacey 

You definitely need to run command on server.

If we don't run php bin/magento setup:upgrade command on the live server. Database will never know then this extension is upgraded.

There are any entry exist in database table of extension version which is running.

You can check in "setup_module" table in the database.