Page MenuHomePhabricator

Wikilambda Extension Can't Find Opis
Closed, DuplicatePublic

Description

Repro Instructions:

# From mediawiki/core
docker-compose exec mediawiki php maintenance/update.php --quick

Results:

# ...
# PHP Fatal error:  Interface 'Opis\JsonSchema\ISchemaLoader' not found in /var/www/html/w/extensions/WikiLambda/function-schemata/php/includes/YumYumYamlLoader.php on line 16

Event Timeline

This also means that the DB isn't being populated with any ZObjects. If I try to do a wikilambda_fetch:

{
    "error": {
        "code": "wikilambda_fetch-missingzid",
        "info": "The given ZID 'Z1' does not exist on this wiki.",
        "*": "See http://localhost/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
    },
    "servedby": "846135d5f140"
}

Never mind; Geno saved my life:

docker-compose exec mediawiki composer require opis/json-schema:1.1.0

Closing as invalid.

Never mind my never mind; Opis is apparently incompatible with other stuff:

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

  Problem 1
    - doctrine/dbal 3.0.0 requires php ^7.3 || ^8.0 -> your PHP version (7.2.31) does not satisfy that requirement.
    - doctrine/dbal 3.0.0 requires php ^7.3 || ^8.0 -> your PHP version (7.2.31) does not satisfy that requirement.
    - Installation request for doctrine/dbal (locked at 3.0.0, required as 2.10.4||3.0.0) -> satisfiable by doctrine/dbal[3.0.0].

Are you using an odd checkout of MW core? We require doctrine/dbal 2.13.3||3.1.2 for PHP 7.2 support.

That's what I have in my composer.json.
Manually adding the Opis requirement to composer.json then running composer update seems to have done the trick.

That's what I have in my composer.json.

Oh, you're directly editing MW core's composer.json file? Yeah, that's not a great idea, but if you need to… Are you tracking origin/master?

Manually adding the Opis requirement to composer.json then running composer update seems to have done the trick.

You're "meant" to use a composer.local file – see https://www.mediawiki.org/wiki/Composer#Using_composer-merge-plugin