Composer doesn’t allow me to update the module to the latest version. Is there a solution for it?

Composer doesn’t allow me to update the module to the latest version. Is there a solution for it?

While updating Amasty extensions via composer, you may encounter a Nothing to install, update or remove message, as if there are no updates for the modules.


There are several possible reasons why the composer is not fetching the latest version of the module.
  1. The module package might be loaded from composer cache.
  2. There may be dependencies that need to be updated along with the main package.
  3. The amasty/base module might not be updated, which can prevent other dependencies from updating via composer update amasty/* command.
To resolve it and successfully retrieve the latest version, follow the steps below:

1. If you're trying to update the modules using this command:

composer update amasty/*

There's a chance the latest versions are not downloaded since amasty/base module is not up-to-date. Due to that, other dependencies cannot be updated either. To check the version of amasty/base you're currently on, use this command:

composer show -l amasty/base

The output should be as follows:



Here, the current version is specified in the versions field and the latest version — in the latest field. In case amasty/base is not up-to-date, require the latest version:

composer require amasty/base:x.x.x

Then, try the update command again:

composer update amasty/*

2. If you download a specific module and composer returns Nothing to install, update or remove, you can require the exact version of the module using this command:

composer require amasty/module-name:^x.x.x

Still, the composer might show another error, stating that The required version doesn’t match your minimum stability or that Your requirements couldn’t be resolved to an installable set of packages:


The issue occurs since the package version you’re trying to install requires an update of other dependent packages. An easy fix is to update the dependent packages to the latest available or latest required version. In the example above, we need to update amasty/base to 1.12.0 or higher. So, we require the modules at the same time, until the dependency issue is resolved:

composer require amasty/module-elastic-search:1.12.0 amasty/base:1.12.0

If there are other dependencies that require to be updated, you can add them to this command as well.

Another solution to it is to require the main package (amasty/module-elastic-search) and specify that it should be updated together with all dependencies:

composer require amasty/module-name:^x.x.x --update-with-dependencies

or

composer require amasty/module-name:^x.x.x --update-with-all-dependencies


      • Related Articles

      • How do I update the theme?

        We are constantly improving and updating our extensions, therefore, we suggest that you always use the latest extension/theme version on your site. An update of a Magento 2 extension/theme from Amasty should be done the same way as it was installed - ...
      • I’m trying to install the module via composer, but the package is not found. How to resolve it?

        Composer is the dependency manager that allows you easily download the required files on your server. The files are located on a remote server, or a repository, that you need to add to the list of “known” ones and authenticate to using the username ...
      • How to update an Amasty extension?

        Below, you may find the instructions on installing an update to an Amasty extension. Choose the appropriate method of the extension update – via Composer or via manual file upload. The choice of the method corresponds to the initial way the extension ...
      • How to proceed if I need to update Amasty Base extension?

        To finish license registration for your amasty.com account, you need to enter your Instance Registration Key into our Base module functionality that becomes available with v.1.16.0 and newer. In order to check your Base module version and its latest ...
      • Composer error: SSL certificate problem: certificate has expired

        When working with composer, you might encounter SSL certificate issues, which can prevent composer from downloading packages. A typical error might look like this: curl error 60 while downloading ...