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 v2 support #59

Open
markus-96 opened this issue Jun 29, 2023 · 3 comments
Open

composer v2 support #59

markus-96 opened this issue Jun 29, 2023 · 3 comments

Comments

@markus-96
Copy link

Setup and configuration

  • SMW version: 4.1.1
  • SCQ version: 2.2.0
  • MW version: 1.39.0
  • DB (MySQL etc.): mariadb

Issue

I want to install with composer, but this extension requires composer >=1.0.1 and many other extensions do not support this anymore, for example external-data:

Produces a stack trace and outputs:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - composer/installers v1.0.22 requires composer-plugin-api 1.0.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
    - composer/installers[v1.0.23, ..., v1.8.0] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
    - Root composer.json requires mediawiki/external-data dev-REL1_39 -> satisfiable by mediawiki/external-data[dev-REL1_39].
    - mediawiki/semantic-compound-queries 2.2.0 requires composer/installers 1.*,>=1.0.1 -> satisfiable by composer/installers[v1.0.1, ..., v1.12.0].
    - You can only install one version of a package, so only one of these can be installed: composer/installers[v1.0.0, ..., v1.12.0, v2.2.0].
    - mediawiki/external-data dev-REL1_39 requires composer/installers ~2.1 -> satisfiable by composer/installers[v2.1.0, v2.1.1, v2.2.0].
    - Root composer.json requires mediawiki/semantic-compound-queries ~2.2 -> satisfiable by mediawiki/semantic-compound-queries[2.2.0].

Steps to reproduce the observation (recommendation is to use the sandbox):

@markus-96
Copy link
Author

This can be resolved by changing the requirements in composer.json, like in semantic-mediawiki:

"require": {
	"php": ">=7.3",
	"composer/installers": "^2.2.0|^1.0.1",
	"mediawiki/semantic-media-wiki": "~3.0|~4.0"
},

@markus-96
Copy link
Author

and with composer 1.10.26:

# sudo -u apache php ../composer.phar update --no-dev --ignore-platform-reqs
> ComposerHookHandler::onPreUpdate
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install mediawiki/page-forms 5.6.1
    - Conclusion: don't install mediawiki/page-forms 5.6|don't install composer/installers v2.2.0
    - Conclusion: don't install mediawiki/page-forms 5.6|don't install composer/installers v2.1.1
    - Installation request for mediawiki/page-forms 5.6.* -> satisfiable by mediawiki/page-forms[5.6, 5.6.1].
    - Installation request for mediawiki/external-data dev-REL1_39 -> satisfiable by mediawiki/external-data[dev-REL1_39].
    - mediawiki/page-forms 5.6 requires composer/installers 1.*,>=1.0.1 -> satisfiable by composer/installers[v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.16, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.20, v1.0.21, v1.0.22, v1.0.23, v1.0.24, v1.0.25, v1.0.3, v1.0.4, v1.0.5, v1.0.6, v1.0.7, v1.0.8, v1.0.9, v1.1.0, v1.10.0, v1.11.0, v1.12.0, v1.2.0, v1.3.0, v1.4.0, v1.5.0, v1.6.0, v1.7.0, v1.8.0, v1.9.0].
    - Can only install one of: composer/installers[v2.1.0, v1.0.1].
    - Can only install one of: composer/installers[v2.1.0, v1.0.10].
    - Can only install one of: composer/installers[v2.1.0, v1.0.11].
    - Can only install one of: composer/installers[v2.1.0, v1.0.12].
    - Can only install one of: composer/installers[v2.1.0, v1.0.13].
    - Can only install one of: composer/installers[v2.1.0, v1.0.14].
    - Can only install one of: composer/installers[v2.1.0, v1.0.15].
    - Can only install one of: composer/installers[v2.1.0, v1.0.16].
    - Can only install one of: composer/installers[v2.1.0, v1.0.17].
    - Can only install one of: composer/installers[v2.1.0, v1.0.18].
    - Can only install one of: composer/installers[v2.1.0, v1.0.19].
    - Can only install one of: composer/installers[v2.1.0, v1.0.2].
    - Can only install one of: composer/installers[v2.1.0, v1.0.20].
    - Can only install one of: composer/installers[v2.1.0, v1.0.21].
    - Can only install one of: composer/installers[v2.1.0, v1.0.22].
    - Can only install one of: composer/installers[v2.1.0, v1.0.23].
    - Can only install one of: composer/installers[v2.1.0, v1.0.24].
    - Can only install one of: composer/installers[v2.1.0, v1.0.25].
    - Can only install one of: composer/installers[v2.1.0, v1.0.3].
    - Can only install one of: composer/installers[v2.1.0, v1.0.4].
    - Can only install one of: composer/installers[v2.1.0, v1.0.5].
    - Can only install one of: composer/installers[v2.1.0, v1.0.6].
    - Can only install one of: composer/installers[v2.1.0, v1.0.7].
    - Can only install one of: composer/installers[v2.1.0, v1.0.8].
    - Can only install one of: composer/installers[v2.1.0, v1.0.9].
    - Can only install one of: composer/installers[v2.1.0, v1.1.0].
    - Can only install one of: composer/installers[v2.1.0, v1.10.0].
    - Can only install one of: composer/installers[v2.1.0, v1.11.0].
    - Can only install one of: composer/installers[v2.1.0, v1.12.0].
    - Can only install one of: composer/installers[v2.1.0, v1.2.0].
    - Can only install one of: composer/installers[v2.1.0, v1.3.0].
    - Can only install one of: composer/installers[v2.1.0, v1.4.0].
    - Can only install one of: composer/installers[v2.1.0, v1.5.0].
    - Can only install one of: composer/installers[v2.1.0, v1.6.0].
    - Can only install one of: composer/installers[v2.1.0, v1.7.0].
    - Can only install one of: composer/installers[v2.1.0, v1.8.0].
    - Can only install one of: composer/installers[v2.1.0, v1.9.0].
    - Conclusion: install composer/installers v2.1.0|install composer/installers v2.1.1|install composer/installers v2.2.0

Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.

@krabina
Copy link

krabina commented Jun 30, 2023

see #58

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

2 participants