Page MenuHomePhabricator

Class undefined: Wikibase\DataModel\Entity\ItemId in WikibaseLib.entitytypes.php on line 35
Closed, DuplicatePublic

Description

A backport to REL1_33 in MF highlighted this failure in WikibaseLib

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/515719/
https://integration.wikimedia.org/ci/job/release-quibble-vendor-mysql-hhvm-docker/1485/console

17:55:32 Fatal error: Class undefined: Wikibase\DataModel\Entity\ItemId in /workspace/src/extensions/Wikibase/lib/WikibaseLib.entitytypes.php on line 35
17:55:32 Traceback (most recent call last):
17:55:32   File "/usr/local/bin/quibble", line 11, in <module>
17:55:32     load_entry_point('quibble==0.0.0', 'console_scripts', 'quibble')()
17:55:32   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 573, in main
17:55:32     cmd.execute()
17:55:32   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 470, in execute
17:55:32     self.mw_install()
17:55:32   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 344, in mw_install
17:55:32     mwdir=self.mw_install_path
17:55:32   File "/usr/local/lib/python3.5/dist-packages/quibble/mediawiki/maintenance.py", line 37, in update
17:55:32     'Update failed with exit code: %s' % p.returncode)
17:55:32 Exception: Update failed with exit code: 255
17:54:15 [6b54d9cc7db1c9f0c1cc4a4d] [no req]   Error from line 35 of /workspace/src/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class 'Wikibase\DataModel\Entity\ItemId' not found
17:54:15 Backtrace:
17:54:15 #0 /workspace/src/extensions/Wikibase/repo/includes/WikibaseRepo.php(757): require()
17:54:15 #1 /workspace/src/extensions/Wikibase/repo/includes/WikibaseRepo.php(387): Wikibase\Repo\WikibaseRepo::getDefaultEntityTypes()
17:54:15 #2 /workspace/src/extensions/Wikibase/repo/includes/WikibaseRepo.php(534): Wikibase\Repo\WikibaseRepo::newInstance()
17:54:15 #3 /workspace/src/extensions/Wikibase/repo/RepoHooks.php(119): Wikibase\Repo\WikibaseRepo::getDefaultInstance()
17:54:15 #4 /workspace/src/includes/Hooks.php(174): Wikibase\RepoHooks::onSetupAfterCache()
17:54:15 #5 /workspace/src/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
17:54:15 #6 /workspace/src/includes/Setup.php(782): Hooks::run(string)
17:54:15 #7 /workspace/src/maintenance/doMaintenance.php(81): require_once(string)
17:54:15 #8 /workspace/src/maintenance/update.php(266): require_once(string)
17:54:15 #9 {main}

I'm guessing it's been caused by b1e65a6661c1aeaa573f19ce4f78ada1c5760084 (trimming bloat out of the vendor REL1_33) as Wikibase\DataModel\Entity\ItemId comes from wikibase/data-model... And if that's the case, T189560: mediawiki/vendor REL1_* no longer ship dependencies for wmf extensions that are not in the mediawiki tarball is probably the ideal fix

Event Timeline

Reedy created this task.Jun 8 2019, 6:21 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptJun 8 2019, 6:21 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Reedy updated the task description. (Show Details)Jun 8 2019, 6:22 PM
Paladox added a subscriber: Paladox.Jun 8 2019, 6:58 PM

I have met the same problem with you, and I want to know how to sove this problem……Could you please tell me, and send email to missrainwang@163.com? Thank you!

I have met the same problem with you, and I want to know how to sove this problem……Could you please tell me, and send email to missrainwang@163.com? Thank you!

I suggest you use Composer to solve the dependency problem. Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries.

Follow this documentation to install Composer and then execute composer install --no-dev in the extension directory. This solution works for any problems caused by lack of dependencies.