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

Composer 2 is not supported by wikimedia/composer-merge-plugin #10

Open
ivanhercaz opened this issue Nov 21, 2020 · 0 comments
Open

Composer 2 is not supported by wikimedia/composer-merge-plugin #10

ivanhercaz opened this issue Nov 21, 2020 · 0 comments

Comments

@ivanhercaz
Copy link

ivanhercaz commented Nov 21, 2020

I need to use this script to create an individual file release for a project in which I have not SSH access (yes, I know it sounds bad). However, when I ran it Semantic MediaWiki nor related extensions are installed in the release due a compatibility problem of composer-merge-plugin with Composer 2, as you can see in wikimedia/composer-merge-plugin#184.

I got the same problem:

  Problem 1
    - Root composer.json requires composer-plugin-api ^1.1, found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - Root composer.json requires wikimedia/composer-merge-plugin 1.4.1 -> satisfiable by wikimedia/composer-merge-plugin[v1.4.1].
    - wikimedia/composer-merge-plugin v1.4.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

My workaround was to download the latest release of Composer 1 and ran myself composer-1.phar update --no-dev --prefer-source.

I think this script should detect if the installed Composer is the version 1.x or 2.x, due 2.x is already available and is being used. If you are agree, I can open a PR for this change in order to:

  • Detect the version of Composer.
  • If the installed Composer is 2.x:
    • The script download Composer 1.
    • Run composer-1.phar update --no-dev --prefer-source.
    • Remove composer-1.phar
  • If the installed Composer is 1.x, just skipped the process described above and continue.

What do you think?

P.S. Just a note that maybe should be another issue: the selection of the version branchs to create the individual release may be chosen interactively by the user or at least warn the users they can change the branch variables (I can contribute with that too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant