Page MenuHomePhabricator

MediaWiki 1.31.0 does not include all files (?): vendor folder/repo mismatching composer.json (something cached/out of date?)
Closed, InvalidPublic

Description

We are trying to upgrade from MediaWiki 1.30 to 1.3.1 using mediawiki-1.31.0.tar.gz. The upgrade is in-place. We backed up the current installation, unpacked the 1.31 tarball over top of the 1.30 installation. Then we restored LocalSettings.php.

We are at Step 6 of Manual:Upgrading:

  • Run the update script to check the database

When we run upgrade.php we encounter an error :

Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies

We get it before and after running the composer file.

I'm not sure what this problem is. I'm not a web developer or web server administrator. Searching is not turning up useful information in the context of an upgrade.

It seems like to me the tarball should include all of the files it needs. Folks should not have to install developer tools on a production server or troubleshoot processes that developers normally engage.

[root@ftpit w]# php maintenance/update.php

Notice: Undefined index: SERVER_NAME in /var/www/html/w/includes/GlobalFunctions.php on line 1432

Notice: Undefined index: SERVER_NAME in /var/www/html/w/includes/GlobalFunctions.php on line 1432
MediaWiki 1.31.0 Updater

oojs/oojs-ui: 0.23.0 installed, 0.26.4 required.
pear/mail: not installed, 1.4.1 required.
pear/mail_mime: not installed, 1.10.2 required.
pear/mail_mime-decode: not installed, 1.5.5.2 required.
wikimedia/at-ease: not installed, 1.2.0 required.
wikimedia/html-formatter: 1.0.1 installed, 1.0.2 required.
wikimedia/ip-set: 1.1.0 installed, 1.2.0 required.
wikimedia/object-factory: not installed, 1.0.0 required.
wikimedia/php-session-serializer: 1.0.4 installed, 1.0.6 required.
wikimedia/purtle: 1.0.6 installed, 1.0.7 required.
wikimedia/relpath: 2.0.0 installed, 2.1.1 required.
wikimedia/remex-html: 1.0.1 installed, 1.0.3 required.
wikimedia/running-stat: 1.1.0 installed, 1.2.1 required.
wikimedia/utfnormal: 1.1.0 installed, 2.0.0 required.
wikimedia/wrappedstring: 2.2.0 installed, 2.3.0 required.

Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies

[root@ftpit w]# composer update --no-dev

[root@ftpit w]# php maintenance/update.php

Notice: Undefined index: SERVER_NAME in /var/www/html/w/includes/GlobalFunctions.php on line 1432

Notice: Undefined index: SERVER_NAME in /var/www/html/w/includes/GlobalFunctions.php on line 1432
MediaWiki 1.31.0 Updater

oojs/oojs-ui: 0.23.0 installed, 0.26.4 required.
pear/mail: not installed, 1.4.1 required.
pear/mail_mime: not installed, 1.10.2 required.
pear/mail_mime-decode: not installed, 1.5.5.2 required.
wikimedia/at-ease: not installed, 1.2.0 required.
wikimedia/html-formatter: 1.0.1 installed, 1.0.2 required.
wikimedia/ip-set: 1.1.0 installed, 1.2.0 required.
wikimedia/object-factory: not installed, 1.0.0 required.
wikimedia/php-session-serializer: 1.0.4 installed, 1.0.6 required.
wikimedia/purtle: 1.0.6 installed, 1.0.7 required.
wikimedia/relpath: 2.0.0 installed, 2.1.1 required.
wikimedia/remex-html: 1.0.1 installed, 1.0.3 required.
wikimedia/running-stat: 1.1.0 installed, 1.2.1 required.
wikimedia/utfnormal: 1.1.0 installed, 2.0.0 required.
wikimedia/wrappedstring: 2.2.0 installed, 2.3.0 required.
Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies

Event Timeline

Sams-MBP:mediawiki-1.31.0 reedy$ grep oojs composer.json 
		"oojs/oojs-ui": "v0.26.4",
Sams-MBP:mediawiki-1.31.0 reedy$ grep oojs vendor/composer.json 
		"oojs/oojs-ui": "0.26.4",

The tarball is correct. It sounds like you didn't replace vendor correctly with the version from the tarball, or else, your install is non standard for some reason

Thanks.

I don't believe I installed something called oojs. So do we delete all the oojs files? It looks like:

# find . -name oojs
./vendor/oojs
./resources/lib/oojs

Can we simply delete all the composer files so things will succeed?

oojs is a javascript library that's been with MediaWiki for a few versions now

I'd suggest replacing the whole vendor folder from the tarball (delete the one in your MW dir, then copy the one out of the tarball in its place)

...
I'd suggest replacing the whole vendor folder from the tarball (delete the one in your MW dir, then copy the one out of the tarball in its place)

Thanks. I performed the following:

cd wiki
rm -rf cache/ includes/ maintenance/ resources/ serialized/ vendor/

cd ..
tar -xf mediawiki-1.31.0.tar.gz --strip-components=1 -C wiki/

cd wiki

And then, try to run update.php again:

# maintenance/update.php

Notice: Undefined index: SERVER_NAME in /var/www/html/w/includes/GlobalFunctions.php on line 1432

Notice: Undefined index: SERVER_NAME in /var/www/html/w/includes/GlobalFunctions.php on line 1432
MediaWiki 1.31.0 Updater

oojs/oojs-ui: 0.23.0 installed, 0.26.4 required.
pear/mail: not installed, 1.4.1 required.
pear/mail_mime: not installed, 1.10.2 required.
pear/mail_mime-decode: not installed, 1.5.5.2 required.
wikimedia/at-ease: not installed, 1.2.0 required.
wikimedia/html-formatter: 1.0.1 installed, 1.0.2 required.
wikimedia/ip-set: 1.1.0 installed, 1.2.0 required.
wikimedia/object-factory: not installed, 1.0.0 required.
wikimedia/php-session-serializer: 1.0.4 installed, 1.0.6 required.
wikimedia/purtle: 1.0.6 installed, 1.0.7 required.
wikimedia/relpath: 2.0.0 installed, 2.1.1 required.
wikimedia/remex-html: 1.0.1 installed, 1.0.3 required.
wikimedia/running-stat: 1.1.0 installed, 1.2.1 required.
wikimedia/utfnormal: 1.1.0 installed, 2.0.0 required.
wikimedia/wrappedstring: 2.2.0 installed, 2.3.0 required.
Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies

I also took a stab at update-composer.sh. It appears it did not work. It produced the same error.

[root@ftpit wiki]# cat ../update-composer.sh

#!/usr/bin/env bash

WIKI_DIR=/var/www/html/wiki
for file in $(find "$WIKI_DIR/" -name 'composer.json'); do
    CDIR=$(pwd)
    FDIR=$(dirname "$file")

    echo "Updating $file"

    cd "$FDIR"
    composer update --no-dev
    cd "$CDIR"
done

[root@ftpit wiki]# ../update-composer.sh
Updating /var/www/html/wiki/vendor/oyejorge/less.php/composer.json
Updating /var/www/html/wiki/vendor/composer/semver/composer.json
Updating /var/www/html/wiki/vendor/pear/mail_mime-decode/composer.json
Updating /var/www/html/wiki/vendor/pear/mail/composer.json
Updating /var/www/html/wiki/vendor/pear/console_getopt/composer.json
Updating /var/www/html/wiki/vendor/pear/pear_exception/composer.json
Updating /var/www/html/wiki/vendor/pear/net_socket/composer.json
Updating /var/www/html/wiki/vendor/pear/mail_mime/composer.json
Updating /var/www/html/wiki/vendor/pear/net_smtp/composer.json
Updating /var/www/html/wiki/vendor/pear/pear-core-minimal/composer.json
Updating /var/www/html/wiki/vendor/liuggio/statsd-php-client/composer.json
Updating /var/www/html/wiki/vendor/justinrainbowiki/json-schema/composer.json
Updating /var/www/html/wiki/vendor/pimple/pimple/composer.json
Updating /var/www/html/wiki/vendor/james-heinrich/getid3/composer.json
Updating /var/www/html/wiki/vendor/wikimedia/assert/composer.json
Updating /var/www/html/wiki/vendor/wikimedia/composer-merge-plugin/composer.json
Updating /var/www/html/wiki/vendor/wikimedia/purtle/composer.json
Updating /var/www/html/wiki/vendor/mustangostang/spyc/composer.json
Updating /var/www/html/wiki/vendor/symfony/process/composer.json
Updating /var/www/html/wiki/vendor/firebase/php-jwt/composer.json
Updating /var/www/html/wiki/vendor/zordius/lightncandy/composer.json
Updating /var/www/html/wiki/vendor/psr/log/composer.json
Updating /var/www/html/wiki/vendor/composer.json
Updating /var/www/html/wiki/vendor/cssjanus/cssjanus/composer.json
Updating /var/www/html/wiki/vendor/stil/gd-text/composer.json
Updating /var/www/html/wiki/vendor/ruflin/elastica/composer.json
Updating /var/www/html/wiki/vendor/monolog/monolog/composer.json
Updating /var/www/html/wiki/skins/Refreshed/composer.json
Updating /var/www/html/wiki/skins/Erudite/composer.json
Updating /var/www/html/wiki/skins/Truglass/composer.json
Updating /var/www/html/wiki/skins/MonoBook/composer.json
Updating /var/www/html/wiki/skins/WPtouch/composer.json
Updating /var/www/html/wiki/skins/CologneBlue/composer.json
Updating /var/www/html/wiki/skins/Dgraph/composer.json
Updating /var/www/html/wiki/skins/Splash/composer.json
Updating /var/www/html/wiki/skins/Bouquet/composer.json
Updating /var/www/html/wiki/skins/GreyStuff/composer.json
Updating /var/www/html/wiki/skins/DarkVector/composer.json
Updating /var/www/html/wiki/skins/Material/composer.json
Updating /var/www/html/wiki/skins/Daddio/composer.json
Updating /var/www/html/wiki/skins/Gamepress/composer.json
Updating /var/www/html/wiki/skins/Metrolook/composer.json
Updating /var/www/html/wiki/skins/Timeless/composer.json
Updating /var/www/html/wiki/skins/Nostalgia/composer.json
Updating /var/www/html/wiki/skins/Modern/composer.json
Updating /var/www/html/wiki/skins/Foreground/composer.json
Updating /var/www/html/wiki/skins/DeskMessMirrored/composer.json
Updating /var/www/html/wiki/skins/BlueSky/composer.json
Updating /var/www/html/wiki/skins/Vector/composer.json
Updating /var/www/html/wiki/extensions/Nuke/composer.json
Updating /var/www/html/wiki/extensions/CiteThisPage/composer.json
Updating /var/www/html/wiki/extensions/SyntaxHighlight_GeSHi/composer.json
Updating /var/www/html/wiki/extensions/ConfirmEdit/composer.json
Updating /var/www/html/wiki/extensions/ReplaceText/composer.json
Updating /var/www/html/wiki/extensions/Interwiki/composer.json
Updating /var/www/html/wiki/extensions/Gadgets/composer.json
Updating /var/www/html/wiki/extensions/OATHAuth/composer.json
Updating /var/www/html/wiki/extensions/CodeEditor/composer.json
Updating /var/www/html/wiki/extensions/ParserFunctions/composer.json
Updating /var/www/html/wiki/extensions/TitleBlacklist/composer.json
Updating /var/www/html/wiki/extensions/Recaptcha/composer.json
Updating /var/www/html/wiki/extensions/Bootstrap/composer.json
Updating /var/www/html/wiki/extensions/SpamBlacklist/composer.json
Updating /var/www/html/wiki/extensions/AllTimeZones/composer.json
Updating /var/www/html/wiki/extensions/MobileFrontend/composer.json
Updating /var/www/html/wiki/extensions/InputBox/composer.json
Updating /var/www/html/wiki/extensions/Poem/composer.json
Updating /var/www/html/wiki/extensions/Renameuser/composer.json
Updating /var/www/html/wiki/extensions/WikiEditor/composer.json
Updating /var/www/html/wiki/extensions/PdfHandler/composer.json
Updating /var/www/html/wiki/extensions/Cite/composer.json
Updating /var/www/html/wiki/extensions/AntiSpoof/composer.json
Updating /var/www/html/wiki/extensions/BlockAndNuke/composer.json
Updating /var/www/html/wiki/extensions/MultimediaViewer/composer.json
Updating /var/www/html/wiki/extensions/LocalisationUpdate/composer.json
Updating /var/www/html/wiki/extensions/CategoryTree/composer.json
Updating /var/www/html/wiki/extensions/ImageMap/composer.json
Updating /var/www/html/wiki/extensions/reCaptcha/composer.json
Updating /var/www/html/wiki/extensions/Math/composer.json
Updating /var/www/html/wiki/composer.json

Does anyone know if MediaWiki 1.31 works with CentOS 7 and PHP 7.1?

Does anyone know if MediaWiki 1.31 works with CentOS 7 and PHP 7.1?

Why? What is that going to fix?

Does anyone know if MediaWiki 1.31 works with CentOS 7 and PHP 7.1?

Why? What is that going to fix?

My bad, that is our setup.

I'm beginning to think MW 1.31 simply does not work on CentOS 7 because some of the components are so old.

I don't think that's the case, the error isn't related to anything installed with your OS

MW is complaining because your vendor folder/repo is mismatched again the composer.json in the root of mediawiki core

It's hard to know exactly what's wrong, but something seems cached/out of date

Aklapper renamed this task from MediaWiki 1.31 does not include all the files it needs to MediaWiki 1.31.0 does not include all files (?): vendor folder/repo mismatching composer.json.Jun 20 2018, 8:38 AM
Aklapper added a project: MediaWiki-General.
Vvjjkkii renamed this task from MediaWiki 1.31.0 does not include all files (?): vendor folder/repo mismatching composer.json to psaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from psaaaaaaaa to MediaWiki 1.31.0 does not include all files (?): vendor folder/repo mismatching composer.json.Jul 2 2018, 4:45 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Aklapper renamed this task from MediaWiki 1.31.0 does not include all files (?): vendor folder/repo mismatching composer.json to MediaWiki 1.31.0 does not include all files (?): vendor folder/repo mismatching composer.json (something cached/out of date?).Sep 7 2018, 12:12 PM