magento/magento-cloud

Magento > 2.4.2 require composer 2

Opened this issue · 2 comments

According to https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html, Magento from 2.4.2 requires composer 2.x but with the current .magento.app.yaml we get composer 1.x

Magento 2.4.2 will eventually work with composer 1.x but 2.4.3 will produce this error during deploy:

Found a `composer.json`, installing dependencies.
    W: Loading composer repositories with package information
    W: Installing dependencies (including require-dev) from lock file
    W: Your requirements could not be resolved to an installable set of packages.
    W:
    W:   Problem 1
    W:     - Installation request for ocramius/proxy-manager 2.10.1 -> satisfiable by ocramius/proxy-manager[2.10.1].
    W:     - ocramius/proxy-manager 2.10.1 requires composer-runtime-api ^2.0.0 -> no matching package found.
    W:   Problem 2
    W:     - ocramius/proxy-manager 2.10.1 requires composer-runtime-api ^2.0.0 -> no matching package found.
    W:     - symfony/proxy-manager-bridge v4.4.18 requires ocramius/proxy-manager ~2.1 -> satisfiable by ocramius/proxy-manager[2.10.1].
    W:     - Installation request for symfony/proxy-manager-bridge v4.4.18 -> satisfiable by symfony/proxy-manager-bridge[v4.4.18].
    W:
    W: Potential causes:
    W:  - A typo in the package name
    W:  - The package is not available in a stable-enough version according to your minimum-stability setting
    W:    see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
    W:  - It's a private package and you forgot to add a custom repository to find it
    W:
    W: Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

You can change composer to version 2 for deployment process.
https://devdocs.magento.com/cloud/project/magento-app-properties.html#installing-and-using-composer-2
I have tried it when was updating Magento from 2.4.3 to version 2.4.3-p1 on cloud, successfully.

@alek-s-andr yes, but i think that a new env should come already with composer 2