ProfessionalWiki / chameleon

Provides a highly flexible and customizable skin using Bootstrap 4
https://www.mediawiki.org/wiki/Skin:Chameleon
Other
114 stars 62 forks source link

Installation with "composer require" fails #99

Open gesinn-it-gea opened 4 years ago

gesinn-it-gea commented 4 years ago
COMPOSER=composer.local.json composer require --update-no-dev mediawiki/chameleon-skin 2.1.0

fails with

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

  Problem 1
    - Installation request for mediawiki/chameleon-skin 2.1.0 -> satisfiable by mediawiki/chameleon-skin[2.1.0].
    - mediawiki/chameleon-skin 2.1.0 requires mediawiki/mediawiki >=1.31 -> no matching package found.

The above command usually works with other extensions installed via composer.

That's how my composer.local.json looks like:

{
    "require": {
        "mediawiki/semantic-media-wiki": "3.1.0",
        "mediawiki/semantic-result-formats": "3.1.0"
    }
}

Did I miss something?

COMPOSER=composer.local.json composer require --update-no-dev mediawiki/chameleon-skin 1.7.1

works without any issues

s7eph4n commented 4 years ago

Chameleon requires mediawiki/mediawiki: >=1.31. The package mediawiki/mediawiki is a virtual package defined by the pre-install-cmd hook invoked in MW's composer.json. So, by setting COMPOSER=composer.local.json you will cause Composer to ignore composer.json and therefore miss the definition of mediawiki/mediawiki.

gesinn-it-gea commented 4 years ago

I was able to solve it splitting this into the following two composer calls:

COMPOSER=composer.local.json composer require --no-update mediawiki/chameleon-skin 2.1.0
composer update --no-dev mediawiki/chameleon-skin
s7eph4n commented 4 years ago

Nice!

s7eph4n commented 4 years ago

I 'll probably steal this for the install instructions.

JeroenDeDauw commented 4 years ago

@gesinn-it a PR that updates https://github.com/ProfessionalWiki/chameleon/blob/master/docs/installation.md with your findings is very welcome!