1

I am trying to upgrade Magento from 2.3.5-p1 to 2.4.2. I have run composer require magento/composer-root-update-plugin=~1.0 --no-update and composer update. Then I got error on some extensions. One of them was for owebia/magento2-module-advanced-shipping-setting. So I have followed as described at https://github.com/owebia/magento2-module-advanced-shipping. But now I run composer require owebia/magento2-module-advanced-shipping:^6.0.1 I am getting below error.

Problem 1
    - owebia/magento2-module-shared-php-config 6.0.1 requires php ~7.4.0|~8.0.0|~8.1.0|~8.2.0 -> your PHP version (7.3.33) does not satisfy that requirement.
    - owebia/magento2-module-advanced-shipping 6.0.1 requires owebia/magento2-module-shared-php-config ^6.0.1 -> satisfiable by owebia/magento2-module-shared-php-config[6.0.1].
    - Installation request for owebia/magento2-module-advanced-shipping ^6.0.1 -> satisfiable by owebia/magento2-module-advanced-shipping[6.0.1].

If I change the PHP version to 7.4 then I am getting another error as shown below.

Problem 1
    - amzn/amazon-pay-and-login-with-amazon-core-module 3.4.1 requires php ~7.1.3||~7.2.0||~7.3.0 -> your PHP version (7.4.33) does not satisfy that requirement.
    - amzn/amazon-pay-and-login-with-amazon-core-module 3.4.1 requires php ~7.1.3||~7.2.0||~7.3.0 -> your PHP version (7.4.33) does not satisfy that requirement.
    - amzn/amazon-pay-and-login-with-amazon-core-module 3.4.1 requires php ~7.1.3||~7.2.0||~7.3.0 -> your PHP version (7.4.33) does not satisfy that requirement.
    - Installation request for amzn/amazon-pay-and-login-with-amazon-core-module (locked at 3.4.1) -> satisfiable by amzn/amazon-pay-and-login-with-amazon-core-module[3.4.1].

How can I upgrade Magento?

Below is the composer.json

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.1.5",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/product-community-edition": "2.4.2",
        "composer/composer": "@alpha",
        "mailchimp/mc-magento2": "*",
        "authorizenet/magento-module-authorizenet": "^1.0",
        "doofinder/doofinder-magento2": "^0.4.13",
        "sendinblue/module-sendinblue": "^2.1",
        "pronko/google-adwords": "1.1.2",
        "magento/composer-root-update-plugin": "~1.0",
        "owebia/magento2-module-advanced-shipping": "^6.0.1"
    },
    "config": {
        "use-include-path": true,
        "disable-tls": false
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "extra": {
        "magento-force": "override"
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.2.0",
        "friendsofphp/php-cs-fixer": "~2.16.0",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "~3.0.0",
        "magento/magento2-functional-testing-framework": "2.4.5",
        "pdepend/pdepend": "~2.7.1",
        "phpmd/phpmd": "^2.8.0",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "~5.0.0",
        "squizlabs/php_codesniffer": "~3.5.4"
    }
}

4 Answers 4

0

Please follow these steps

Step 1. Download ver:2.4.2 composer.json by following command in other temp directory.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.2 .

Step 2. Take backup current composer.json and composer.lock files

Step 3. Upload the composer.json from temp directory to your project directory

Step 4. Run composer update command

Step 5. Run setup upgrade and deploy commands

Step 6. Now install other require modules

2
  • It is a backup of the live site I am trying to upgrade, it has data
    – Akhilesh
    Commented Jun 21, 2023 at 5:01
  • Okay, Please try these steps, It's easy method to upgrade Magento version.
    – MP Raj
    Commented Jun 21, 2023 at 5:04
0

Match your composer.json file

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "version": "2.4.2",
    "require": {
        "magento/product-community-edition": "2.4.2",
        "magento/composer-root-update-plugin": "~1.1"
    },
    "autoload": {
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ],
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "psr-0": {
            "": [
                "app/code/",
                "generated/code/"
            ]
        },
        "psr-4": {
            "Magento\\": "app/code/Magento/",
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        }
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.2.0",
        "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
        "friendsofphp/php-cs-fixer": "~2.16.0",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "*",
        "magento/magento2-functional-testing-framework": "^3.0",
        "pdepend/pdepend": "~2.7.1",
        "phpcompatibility/php-compatibility": "^9.3",
        "phpmd/phpmd": "^2.8.0",
        "phpstan/phpstan": ">=0.12.3 <=0.12.23",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "~5.0.0",
        "squizlabs/php_codesniffer": "~3.5.4"
    },
    "conflict": {
        "gene/bluefoot": "*"
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/",
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/"
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true,
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "extra": {
        "magento-force": "override"
    }
}
0

You need to add this --ignore-platform-reqs after every composer command to ignore PHP version error as some of your modules are not compatible with the current PHP version.

composer update --ignore-platform-reqs

composer require owebia/magento2-module-advanced-shipping:^6.0.1 --ignore-platform-reqs

After the successful upgrade, you have to test these extensions proactively.

One more thing you should use the PHP version which is compatible with the Magento version you are upgrading to, check the below link:

For 2.4.2: PHP version should be 7.4

https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html

UPDATE:

Update your composer.json with below code and then run composer update --ignore-platform-reqs

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.4.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/product-community-edition": "2.4.2",
        "composer/composer": "@alpha",
        "mailchimp/mc-magento2": "*",
        "authorizenet/magento-module-authorizenet": "^2.0",
        "doofinder/doofinder-magento2": "^0.4.13",
        "sendinblue/module-sendinblue": "^2.1",
        "pronko/google-adwords": "1.1.2",
        "magento/composer-root-update-plugin": "~1.0",
        "owebia/magento2-module-advanced-shipping": "^6.0.1",
        "magento/module-vault": "101.1.*"
    },
    "config": {
        "use-include-path": true,
        "disable-tls": false
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "extra": {
        "magento-force": "override"
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.2.0",
        "friendsofphp/php-cs-fixer": "~2.16.0",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "~3.0.0",
        "magento/magento2-functional-testing-framework": "2.4.5",
        "pdepend/pdepend": "~2.7.1",
        "phpmd/phpmd": "^2.8.0",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "~5.0.0",
        "squizlabs/php_codesniffer": "~3.5.4"
    }
}
11
  • Still getting the error authorizenet/magento-module-echeck 1.0.1 requires magento/module-vault 101.0.*|101.1.* -> satisfiable by magento/module-vault[101.1.5, 101.1.7-p2, 101.1.7-p1, 101.1.7, 101.1.6-p1, 101.1.6, 101.1.4-p2, 101.1.4, 101.0.8, 101.0.7, 101.1.3, 101.0.6, 101.1.2, 101.1.1, 101.1.0, 101.0.5, 101.0.4, 101.0.3, 101.0.2, 101.0.1, 101.0.0, 101.0.0-rc30, 101.0.0-rc23, 101.0.0-rc22, 101.0.0-rc21].
    – Akhilesh
    Commented Jun 21, 2023 at 5:58
  • @Akhilesh, paste your composer.json in your question. So that I can look into the issue Commented Jun 22, 2023 at 4:08
  • Try by adding "magento/module-vault": "101.1.*" in your composer.json's "require": {"magento/module-vault": "101.1.*", } then run composer update --ignore-platform-reqs Commented Jun 22, 2023 at 4:12
  • Added composer.json content
    – Akhilesh
    Commented Jun 22, 2023 at 13:14
  • magento.stackexchange.com/questions/367941/…
    – MP Raj
    Commented Jun 22, 2023 at 13:17
0

I tried your composer.json in my local and successfully updated it to 2.4.2.

You must have PHP Version 7.4.X and Composer version 2.2.x

composer.json

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "laminas/laminas-dependency-plugin": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "magento/composer-root-update-plugin": true,
            "magento/inventory-composer-installer": true,
            "magento/magento-composer-installer": true
        }
    },
    "version": "2.4.2",
    "require": {
        "composer/composer": "@alpha",
        "doofinder/doofinder-magento2": "^0.12.0",
        "magento/composer-root-update-plugin": "~1.1",
        "magento/product-community-edition": "2.4.2",
        "mailchimp/mc-magento2": "*",
        "owebia/magento2-module-advanced-shipping": "^6.0",
        "sendinblue/module-sendinblue": "^2.1"
    },
    "autoload": {
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ],
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "psr-0": {
            "": [
                "app/code/",
                "generated/code/"
            ]
        },
        "psr-4": {
            "Magento\\": "app/code/Magento/",
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        }
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.2.0",
        "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
        "friendsofphp/php-cs-fixer": "~2.16.0",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "*",
        "magento/magento2-functional-testing-framework": "^3.0",
        "pdepend/pdepend": "~2.7.1",
        "phpcompatibility/php-compatibility": "^9.3",
        "phpmd/phpmd": "^2.8.0",
        "phpstan/phpstan": ">=0.12.3 <=0.12.23",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "~5.0.0",
        "squizlabs/php_codesniffer": "~3.5.4"
    },
    "conflict": {
        "gene/bluefoot": "*"
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/",
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "repositories": {
        "local": {
            "type": "path",
            "url": "packages/*/*"
        },
        "magento": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    },
    "extra": {
        "magento-force": "override"
    }
}

Please check the below points.

sendinblue/module-sendinblue -> https://github.com/sendinblue/magento2-plugin/tree/master

authorizenet/magento-module-authorizenet -> You should Purchase this module from Marketplace and add you key to auth.json and run below command

link : https://commercemarketplace.adobe.com/partner/RootwaysInc

Reference: How to install "authorizenet/magento-module-authorizenet" on Magento 2.4?

composer require authorizenet/magento-module-authorizenet

pronko/google-adwords -> https://commercemarketplace.adobe.com/pronko-google-adwords.html

Also read this document where they provide installation steps.

Link : https://commercemarketplace.adobe.com/media/catalog/product/pronko-google-adwords-1-1-2-ce/installation_guides.pdf

owebia/magento2-module-advanced-shipping -> https://github.com/owebia/magento2-module-advanced-shipping/tree/master

owebia/magento2-module-shared-php-config -> https://github.com/owebia/magento2-module-shared-php-config/tree/master

Note: Download these updated files where I updated your composer.json file. Click Here

I place some packages at the below location to fix composer error.

RootMagento/packages/owebia/magento2-module-advanced-shipping/ -> https://github.com/owebia/magento2-module-advanced-shipping/tree/master

RootMagento/packages/owebia/magento2-module-shared-php-config/ -> https://github.com/owebia/magento2-module-shared-php-config/tree/master

RootMagento/packages/sendinblue/module-sendinblue/ -> https://github.com/sendinblue/magento2-plugin/tree/master

When you install any marketplace module please read this : https://www.rakeshjesadiya.com/install-magento-marketplace-module-using-compose/

Maybe this helps you.

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.