cancel
Showing results for 
Search instead for 
Did you mean: 

Error while trying to install Magento 2.4.3-p2 using Composer

SOLVED

Error while trying to install Magento 2.4.3-p2 using Composer

Hey everyone, 

As the title states, I am getting an error when I install Magento 2.4.3-p2 (I also tried installing 2.4.3 and 2.4.0 but to no merit).

I use the 

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.2 <install-directory-name>

 command in order to install it, but I get the following error:

 

Problem 1
    - Installation request for magento/product-community-edition 2.4.3-p2 -> satisfiable by magento/product-community-edition[2.4.3-p2].
    - magento/product-community-edition 2.4.3-p2 requires php ~7.3.0||~7.4.0 -> your PHP version (8.1.6) does not satisfy that requirement

 

I have tried changing from:

"squizlabs/php_codesniffer": "~3.5.4",

to:

"squizlabs/php_codesniffer": "~3.3.0",

as I read it might help, but it did not.

 

This is what my composer.json file looks like:

{
    "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.3-p2",
    "require": {
        "magento/product-community-edition": "2.4.3-p2",
        "magento/composer-dependency-version-audit-plugin": "~0.1",
        "magento/composer-root-update-plugin": "~2.0"
    },
    "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/"
        }
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.4",
        "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
        "friendsofphp/php-cs-fixer": "~2.18.1",
        "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.77",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "^6.0.3",
        "squizlabs/php_codesniffer": "~3.5.4",
        "symfony/finder": "^5.2"
    },
    "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"
    }
}

What can I do to get it to install?

As a note, I am also running version 1.10.26 of Composer.
Thank you in advance, have a great day!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error while trying to install Magento 2.4.3-p2 using Composer

It looks like that you are using latest php version. (Php 8.1). Don't use that with Magento 2.4.3 version that's why it is giving error to you. You need yo install PHP 7.4 version for Magento 2.4.3

It will work fine.

View solution in original post

1 REPLY 1

Re: Error while trying to install Magento 2.4.3-p2 using Composer

It looks like that you are using latest php version. (Php 8.1). Don't use that with Magento 2.4.3 version that's why it is giving error to you. You need yo install PHP 7.4 version for Magento 2.4.3

It will work fine.