Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento installation fails with composer 2.2.0 RC1 #34831

Closed
jonashrem opened this issue Dec 16, 2021 · 18 comments · Fixed by #34873
Closed

Magento installation fails with composer 2.2.0 RC1 #34831

jonashrem opened this issue Dec 16, 2021 · 18 comments · Fixed by #34873
Assignees
Labels
Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S1 Affects critical data or functionality and forces users to employ a workaround.

Comments

@jonashrem
Copy link
Contributor

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>]
@m2-assistant
Copy link

m2-assistant bot commented Dec 16, 2021

Hi @jonashrem. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Dec 17, 2021

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

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:

image

Hence confirming this issue.

Thanks

@engcom-Hotel engcom-Hotel added Reported on 2.4.x Indicates original Magento version for the Issue report. Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Dec 17, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Dec 17, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-2008 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Dec 17, 2021

✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@ihor-sviziev ihor-sviziev added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. labels Dec 18, 2021
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Dec 18, 2021
@ihor-sviziev
Copy link
Contributor

@sidolov i put priority to p1 as you can’t crate a new magento project with composer 2.2

@giacmir
Copy link
Member

giacmir commented Dec 22, 2021

Composer 2.2 has been released today. At this time Magento2 is not compatible with Composer 2.

@raumatbel
Copy link
Contributor

raumatbel commented Dec 22, 2021

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.

@mbrioski
Copy link

In Magento cloud we have the version 2.1.14 and we have the same problem

@ssx
Copy link
Contributor

ssx commented Dec 22, 2021

In Magento cloud we have the version 2.1.14 and we have the same problem

If you pin it in .magento.app.yaml it'll work:

dependencies:
  php:
    composer/composer: '>=2.0 <2.2'

then clear your project's build cache.

@alanbort
Copy link

alanbort commented Dec 22, 2021

Hi, consider using the more generic '>=2.0 <2.2' for composer version in .magento.app.yaml:

dependencies:
    php:
        composer/composer: '>=2.0 <2.2'

@mbrioski
Copy link

mbrioski commented Dec 22, 2021

As long there are versions like 2.1.14 having the same issue, i will go with :

dependencies:
  php:
    composer/composer: '2.1.4'

@Alexander-Pop
Copy link

changing composer version to '2.1.4' fixed this issue for us. TY

@gvasilakiss
Copy link

Same issue here, by changing the version to 2.1.4 fixed my installation.

@hostep
Copy link
Contributor

hostep commented Dec 22, 2021

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.

@github-jira-sync-bot github-jira-sync-bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: PR in progress and removed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: ready for dev labels Dec 23, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Pull Request In Progress in High Priority Backlog Dec 23, 2021
@hostep
Copy link
Contributor

hostep commented Dec 23, 2021

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.

@manugentoo
Copy link

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

@hostep
Copy link
Contributor

hostep commented Jan 6, 2022

You'd probably want to update to at least composer 2.2.3 to avoid other crazy weirdness happening 😉

nemke82 added a commit to nemke82/magento2gitpod that referenced this issue Jan 9, 2022
Added --no-interaction --no-progress to composer require and composer install due magento/magento2#34831
nemke82 added a commit to nemke82/magento2gitpod that referenced this issue Jan 9, 2022
Added --no-interaction --no-progress to composer require and composer install due magento/magento2#34831
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects