magento2: Magento installation fails with composer 2.2.0 RC1
magento installation fails with composer 2.2.0 RC1
Preconditions (*)
install composer 2.2.0 RC1
Steps to reproduce (*)
download composer 2.2.0 from https://getcomposer.org/download/2.2.0-RC1/composer.phar php7.4 composer2 create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2
Expected result (*)
magento installes as with composer 2.1
Actual result (*)
magento installation fails:
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 591 installs, 0 updates, 0 removals
- Installing laminas/laminas-dependency-plugin (2.2.0): Extracting archive
laminas/laminas-dependency-plugin contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "laminas/laminas-dependency-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
Plugin initialization failed (require(app/etc/NonComposerComponentRegistration.php): failed to open stream: No such file or directory), uninstalling plugin
- Removing laminas/laminas-dependency-plugin (2.2.0)
Install of laminas/laminas-dependency-plugin failed
[ErrorException]
require(app/etc/NonComposerComponentRegistration.php): failed to open stream: No such file or directory
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 18 (8 by maintainers)
Commits related to this issue
- fix for composer 2.2 Added --no-interaction --no-progress to composer require and composer install due https://github.com/magento/magento2/issues/34831 — committed to nemke82/magento2gitpod by nemke82 2 years ago
- fix for composer 2.2 Added --no-interaction --no-progress to composer require and composer install due https://github.com/magento/magento2/issues/34831 — committed to nemke82/magento2gitpod by nemke82 2 years ago
As long there are versions like 2.1.14 having the same issue, i will go with :
Composer 2.2 has been released today. At this time Magento2 is not compatible with Composer 2.
This issue is now fixed in composer 2.2.1
Make sure to allow all the plugins it asks for during installation to be allowed though.
You have to downgrade the version of composer to 2.1.4 Run this
composer selfupdate -- 2.1.4
. With the last version of composer 2.2, the installation fails.You’d probably want to update to at least composer 2.2.3 to avoid other crazy weirdness happening 😉
In my end. Composer version 2.1.2 worked well on Magento V2.4.2, V2.4.2-p1, V2.4.3, V2.4.3-p1
Linking to two bugreports on composer’s repo:
Based on the comments in there, I’d expect the next version of composer to be released within a few days which will probably fix this problem.
changing composer version to ‘2.1.4’ fixed this issue for us. TY
@sidolov i put priority to p1 as you can’t crate a new magento project with composer 2.2
Same issue here, by changing the version to 2.1.4 fixed my installation.
Hi, consider using the more generic ‘>=2.0 <2.2’ for composer version in
.magento.app.yaml
:In Magento cloud we have the version 2.1.14 and we have the same problem
Hello @jonashrem,
We have tried this issue by running below command:
./composer220RC1.phar create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento34831 <FOLDER-NAME>
And for us, the issue is reproducible for us:
Hence confirming this issue.
Thanks