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

Issue updating to v10 with composer #745

Open
dexgs opened this issue Jun 12, 2023 · 2 comments
Open

Issue updating to v10 with composer #745

dexgs opened this issue Jun 12, 2023 · 2 comments
Labels

Comments

@dexgs
Copy link
Contributor

dexgs commented Jun 12, 2023

I ran into the same issue described here by a reddit user: https://old.reddit.com/r/mediawiki/comments/1170jrz/maps_100_will_not_install_what_to_do/

With the following composer.local.json:

{
    "require": {
        "mediawiki/maps": "^10.0",
        "mediawiki/semantic-media-wiki": "^4.0"
    },

    "extra": {
        "merge-plugin": {
                        "include": [
                                "extensions/*/composer.json",
                                "skins/*/composer.json"
                        ]
        }
    }
}

I got the following error after running composer update --no-dev:

  Problem 1
    - mediawiki/core is present at version 1.0.0+no-version-set and cannot be modified by Composer
    - mediawiki/maps[10.0.0] cannot be installed as that would require removing mediawiki/core[1.0.0+no-version-set]. They both replace mediawiki/semantic-maps and thus cannot coexist.
    - Root composer.json requires mediawiki/maps ^10.0 -> satisfiable by mediawiki/maps[10.0.0].

I was able to resolve the issue by temporarily removing composer.local.json, running composer update --no-dev and then restoring composer.local.json and updating a second time, but I don't understand what caused the problem in the first place.

The mediawiki/core package doesn't seem to make any mention of mediawiki/semantic-maps, so I'm not sure where the conflict comes from.

I would appreciate any help understanding the what causes the problem so I don't have it in the future.

@dexgs dexgs added the question label Jun 12, 2023
ionparticle added a commit to ubc/mediawiki-docker that referenced this issue Jun 28, 2023
The caliper-php repo went private. So I've switched the source to an
archive.

Found out that you can merge in extension composer.json instead of
duplicating it in composer.local.json, so I changed it to pull in the
caliper-php lib via the caliper extension's composer.json.

I tried merging in all extension composer.json, but it didn't work,
there was a conflict with the mediawiki/maps package, open issue here:
ProfessionalWiki/Maps#745

If it weren't for that, we could use the mediawiki suggested:

{
    "extra": {
        "merge-plugin": {
            "include": [
                "extensions/*/composer.json",
                "skins/*/composer.json"
            ]
        }
    }
}

Which pulls in all extension/skin dependencies automatically.
@felipeforte
Copy link

Currently facing the same issue with a MediaWiki 1.41 installation.

  Problem 1
    - mediawiki/core is present at version dev-main and cannot be modified by Composer
    - mediawiki/maps[10.1.0, 10.1.1, 10.1.2] cannot be installed as that would require removing mediawiki/core[dev-main]. They both replace mediawiki/semantic-maps and thus cannot coexist.
    - Root composer.json requires mediawiki/maps ~10.1 -> satisfiable by mediawiki/maps[10.1.0, 10.1.1, 10.1.2].

@JeroenDeDauw
Copy link
Member

Don't do this: "extensions/*/composer.json",, it is causing stuff to be loaded multiple times

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

No branches or pull requests

3 participants