Hi, since this change https://github.com/wikimedia/mediawiki-vendor/commit/90fef8279a44622b14cf9d84de7f051a4c50b9bd, wikibase has been failing with " Error from line 35 of /srv/mediawiki/w/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class 'Wikibase\DataModel\Entity\ItemId' not found" (i've ran composer and that did not fix it)
Description
Related Objects
- Mentioned In
- T230451: Class 'Wikibase\DataModel\Entity\ItemId' not found in various CI-related dockers
- Mentioned Here
- T225354: VisualEditor broken on REL1_33: "ConfigException: undefined option: 'EnableBlockNoticeStats'"
T230451: Class 'Wikibase\DataModel\Entity\ItemId' not found in various CI-related dockers
T201615: Wikibase on Vagrant: Class 'Wikibase\DataModel\Entity\ItemId' not found
Event Timeline
This is desired behaviour. Release branches of mediawiki-vendor shouldn't have random stuff that's needed for WMF prod. It should only have MW core and bundled extension dependancies
If running composer didn't fix it, chances are it's because you don't have the composer-merge-plugin setup correctly to comb the extensions for the libraries they need too
Change 472787 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/vendor@REL1_32] Revert "Remove non-tarball dependencies from release branch"
Change 472787 abandoned by Zoranzoki21:
Revert "Remove non-tarball dependencies from release branch"
Reason:
Per Reedy`s comment in task
wikibase/data-model/src/Entity/Item.php
wikibase/data-model/src/Entity/ItemId.php
wikibase/data-model/src/Entity/ItemIdParser.php
wikibase/data-model/src/Entity/ItemIdSet.php
These files should be rollbacked,
So i found a hack, if you add require_once DIR ../vendor/autoload.php it works in WikibaseRepo.php.
So i guess that's what is needed?
Aha, they removed this
// This is the path to the autoloader generated by composer in case of a composer install. if ( is_readable( __DIR__ . '/../vendor/autoload.php' ) ) { require_once __DIR__ . '/../vendor/autoload.php'; }
from WikibaseLib.php (it's in mw 1.31 but not 1.32)
Nope, it seems they changed it to using the merge plugin (as you said earlier). But i would expect a extension to try to load it locally before using the mw core one.
That’s why composer.json has the thing to mark that an extension has dependencies so you can have them locally in the extension or in the one for core
Wikibase et are complex
(But dosent really explain why it had to be removed compared to checking if vendor/autoload.php exists in the extension root and then fallback to mw core vendor)
That would break running composer install/update in the extension dir and expecting it to work...
Wouldn't change running it in MW core root
Indeed, Wikibase composer dependencies are meant to be installed by doing composer update / install in the root mediawiki dir and using the composer merge plugin.
This is documented in the extension readme https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/README.md#install
I wouldn't expect the wikibase deps to be in the tarballed mediawiki-vendor repo.
@Addshore nope, it was caused by https://github.com/wikimedia/mediawiki-extensions-Wikibase/commit/505e4860cc720e1a5098fd3272268448d3342074#diff-0bca4e0eecbdd09ab1c39db21d521610 which is in REL1_32+
This is a problem on Vagrant, but that has its own task already: T201615: Wikibase on Vagrant: Class 'Wikibase\DataModel\Entity\ItemId' not found. Shouldn't be a problem in a manual Wikibase install in theory.
This isn't really an issue with wikibase.
Just things using Wikibase
I think we can close