1

Running 2.3.6 When I try to install any module via composer I get the following error:

 []$ COMPOSER_MEMORY_LIMIT=-1 composer require stripe/stripe-php:^7
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove magento/product-community-edition 2.3.6
    - Conclusion: don't install magento/product-community-edition 2.3.6
    - Installation request for magento/product-community-edition 2.3.6 -> satisfiable by magento/product-community-edition[2.3.6].
    - Installation request for veriteworks/cookiefix ^3.0 -> satisfiable by veriteworks/cookiefix[3.0.0].
    - Conclusion: don't install magento/framework 102.0.6-p1
    - magento/product-community-edition 2.3.6 requires laminas/laminas-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.2, 3.3.0, 3.3.1].
    - Can only install one of: laminas/laminas-code[3.4.1, 3.3.0].
    - Can only install one of: laminas/laminas-code[3.4.1, 3.3.1].
    - Can only install one of: laminas/laminas-code[3.4.1, 3.3.2].
    - Can only install one of: laminas/laminas-code[3.4.1, 3.3.2].
    - Can only install one of: laminas/laminas-code[3.4.1, 3.3.2].
    - Conclusion: install magento/framework 102.0.6-p1|install laminas/laminas-code 3.4.1


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

What is composer telling me to do?

Is it possible i made a mess since few days ago (before that I think everything was working fine) and then I launched "composer dump-autoload -o" for some reason?

Edit: i ran same command and got different error

     composer require stripe/stripe-php:^7
The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/composer-root-update-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
./composer.json has been updated
The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/composer-root-update-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Running composer update stripe/stripe-php
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/composer-root-update-plugin is locked to version 1.0.0 and an update of this package was not requested.
    - magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - Root composer.json requires veriteworks/cookiefix ^3.0 -> satisfiable by veriteworks/cookiefix[3.0.0].
    - veriteworks/cookiefix 3.0.0 requires magento/framework ~102.0.6-p1||~103.0.1 -> found magento/framework[102.0.6-p1, 103.0.1, 103.0.1-p1, 103.0.2] but the package is fixed to 102.0.6 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
  Problem 3
    - dealerdirect/phpcodesniffer-composer-installer is locked to version v0.5.0 and an update of this package was not requested.
    - dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 4
    - laminas/laminas-dependency-plugin 1.0.4 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - magento/product-community-edition 2.3.6 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin[1.0.4].
    - magento/product-community-edition is locked to version 2.3.6 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

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.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

2 Answers 2

1

I looked into composer.json in root and found

"require": {
    "experius/module-exceptiondebugger": "^1.0",
    "fooman/printorderpdf-m2": "^3.0",
    "google/recaptcha": "^1.2",
    "laminas/laminas-code": "^3.4.1",
    "magento/composer-root-update-plugin": "~1.0",
    "magento/product-community-edition": "2.3.6",
    "magento/quality-patches": "^1.0",
    "mageplaza/module-core": "^1.4",
    "mageplaza/module-google-recaptcha": "^4.0",
    "magepow/categories": "^1.0",
    "rapiddive/fiximage": "^1.0",
    "stripe/stripe-php": "^7",
    "symfony/polyfill-iconv": "^1.22",
    "veriteworks/cookiefix": "^3.0"
},
"require-dev": {
    "allure-framework/allure-phpunit": "~1.2.0",
    "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
    "friendsofphp/php-cs-fixer": "~2.14.0",
    "lusitanian/oauth": "~0.8.10",
    "magento/magento-coding-standard": "*",
    "magento/magento2-functional-testing-framework": "~2.6.5",
    "pdepend/pdepend": "2.5.2",
    "phpcompatibility/php-compatibility": "^9.3",
    "phpmd/phpmd": "@stable",
    "phpstan/phpstan": "^0.12.2",
    "phpunit/phpunit": "~6.5.0",
    "sebastian/phpcpd": "~3.0.0",
    "squizlabs/php_codesniffer": "~3.4.0"

So i tried to remove both rows "veriteworks/cookiefix": "^3.0" "laminas/laminas-code": "^3.4.1"

and composer started working again

What i saw in modules was that laminas was already installed ver 3.3.2 tho other module file "veriteworks" wasn't present at all both in app / vendor, maybe previous intallation failed

0

You are using composer version 2, which isnt compatible to magento 2.3 - either you "downgrade" composer to version 1:

composer self-update --1

or you install a more recent magento version (I think, the support for version 2 was added in 2.4)

3
  • unfortunately, after downgraded composer (auto upgraded after a cpanel update) first error came back Apr 17, 2021 at 8:25
  • I looked into my composer.json file in root and found Apr 17, 2021 at 9:37
  • Possible issue for your composer version, downgrade and clear composer cache. <code>composer clearccache</code> Oct 25, 2022 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.