0

I try to update the package amasty/module-fpc-warmer to 2.4.6.

Attempt:

$ composer require amasty/module-fpc-warmer:2.4.6

Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Loading composer repositories with package information                                                                                                                                 Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install amasty/module-fpc-warmer 2.4.6
    - Installation request for amasty/module-fpc-warmer 2.4.6 -> satisfiable by amasty/module-fpc-warmer[2.4.6].
    - Conclusion: don't install amasty/base 1.12.15
    - amasty/module-fpc-warmer 2.4.6 requires amasty/base >=1.13.4 -> satisfiable by amasty/base[1.13.4, 1.13.5].
    - Can only install one of: amasty/base[1.12.15, 1.13.4].
    - Can only install one of: amasty/base[1.12.15, 1.13.5].
    - Can only install one of: amasty/base[1.12.15, 1.13.5].
    - Installation request for amasty/base (locked at 1.12.15) -> satisfiable by amasty/base[1.12.15].


Installation failed, reverting ./composer.json to its original content.

It says amasty/module-fpc-warmer 2.4.6 requires amasty/base >=1.13.4

So I tried to update amasty/base to 1.13.4 first, but this also updates / downgrades many other extensions which are completly unrelated like bsscommerce/customer-approval

$ composer require amasty/base:1.13.4

Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Loading composer repositories with package information                                                                                                                                 Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Package operations: 4 installs, 16 updates, 0 removals
  - Updating amasty/base (1.12.16 => 1.13.4): Downloading (100%)
  - Updating amasty/aminvisiblecaptcha (2.4.1 => 2.4.5): Loading from cache
  - Updating amasty/advanced-review (1.14.11 => 1.15.2): Loading from cache
  - Updating amasty/module-google-customer-reviews (1.0.0 => 1.0.1): Loading from cache
  - Downgrading bsscommerce/customer-approval (1.1.5 => 1.1.4): Loading from cache
  - Downgrading symfony/console (v4.4.33 => v4.4.30): Loading from cache
  - Downgrading laminas/laminas-filter (2.12.0 => 2.11.1): Loading from cache
  - Downgrading guzzlehttp/promises (1.5.1 => 1.5.0): Loading from cache
  - Downgrading composer/ca-bundle (1.3.1 => 1.2.11): Loading from cache
  - Updating fooman/pdfcore-m2 (19.13.2 => 19.14.0): Loading from cache
  - Updating fooman/pdfcustomiser-implementation-m2 (116.6.1 => 116.8.0): Loading from cache
  - Updating fooman/pdfcustomiser-m2 (8.6.1 => 8.6.3)
  - Updating sendinblue/module-sendinblue (2.1.9 => 2.1.16): Loading from cache
  - Installing rosell-dk/exec-with-fallback (1.2.0): Loading from cache
  - Installing rosell-dk/file-util (0.1.1): Loading from cache
  - Installing rosell-dk/locate-binaries (1.0): Loading from cache
  - Installing rosell-dk/image-mime-type-sniffer (1.1.1): Loading from cache
  - Updating rosell-dk/image-mime-type-guesser (0.3.1 => 1.1.1): Loading from cache
  - Updating rosell-dk/webp-convert (2.6.0 => 2.9.2): Loading from cache
  - Updating yireo/magento2-next-gen-images (0.2.10 => 0.2.13): Loading from cache

Why does it update / downgrade unrelated packages and how can I stop it from doing so?

I just wanted to update amasty/base and amasty/module-fpc-warmer with their dependencies.

Black
  • 18,150
  • 39
  • 158
  • 271
  • Does [this](https://stackoverflow.com/a/30712130/17089665) solve your problem? – S. Dre Jul 28 '22 at 09:30
  • Well, your first step should probably be to pay attention to that warning at the top that you're running an out of date version of Composer. If nothing else, the error messages in newer versions are a lot clearer, so it might be clearer what's actually happening. – IMSoP Jul 28 '22 at 09:31
  • @IMSoP, it does not work with composer v2, I get `You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.` – Black Jul 28 '22 at 09:34
  • @S.Dre, no I tried it like this `composer update amasty/base:1.13.4 amasty/module-fpc-warmer:2.4.6` but I get `Package "amasty/base:1.13.4" listed for update is not installed. Ignoring.` and `Package "amasty/module-fpc-warmer:2.4.6" listed for update is not installed. Ignoring.` – Black Jul 28 '22 at 09:38
  • 1
    Can you try to run it with the `--no-update` flag? As mentioned [here](https://stackoverflow.com/a/62090242/17089665) – S. Dre Jul 28 '22 at 09:44
  • @S.Dre, this does just update the composer.json but does not download anything. – Black Jul 28 '22 at 09:48
  • That's probably because you have already downloaded the required package in one of your earlier executions. Is it in your `vendor` or `var` directories? – S. Dre Jul 28 '22 at 09:50
  • @S.Dre, no, the vendor folder is included in my git repository and I resetted to the last commit before I executed the command. I even tried it again to get sure. I still just get `./composer.json has been updated` and nothing more. – Black Jul 28 '22 at 09:53
  • Seems that "bsscommerce/customer-approval" is a third party extension,add the --no-update flag,the flag says to update this specific package but no others. I would add first the independed modules that amasty ask and add the --no-update flag like so: composer require amasty/module-fpc-warmer:2.4.6 amasty/base:1.13.4 --no-update Then I would execute de composer update with the independed modules that amasty askes and add the --no-dev flag at the end. composer update composer require amasty/module-fpc-warmer amasty/base --no-dev – dreid Jul 29 '22 at 21:12

1 Answers1

0

I think I found the reason.

We are using a master and a staging branch and the staging branch (where the problem occurs) was using the composer.lock from master, because I picked it with git checkout --theirs . as there was a merge conflict.

Black
  • 18,150
  • 39
  • 158
  • 271