SemanticMediaWiki / SemanticCompoundQueries

Allows for the display of multiple inline queries in a single visualization
https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
GNU General Public License v2.0
6 stars 7 forks source link

composer v2 support #59

Open markus-96 opened 1 year ago

markus-96 commented 1 year ago

Setup and configuration

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

see https://github.com/SemanticMediaWiki/SemanticCompoundQueries/pull/58