Class Wikibase\DataModel\Entity\ItemId 未找到 WikiBase 安装

Class Wikibase\DataModel\Entity\ItemId not found WikiBase installation

我目前正在尝试学习本教程:https://www.mediawiki.org/wiki/Wikibase/Installation

我有最新版本的 MediaWiki 和 WikiBase (1.35) 我目前正在尝试 运行 维护脚本。 我已经安装了 Wikibase Repository and Wikibase Client.

当我尝试 运行 "php maintenance/update.php" 时出现此错误:

Error from line 47 of /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class "Wikibase\DataModel\Entity\ItemId" not found
#0 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(695): require()
#1 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(410): Wikibase\Repo\WikibaseRepo::getDefaultEntityTypes()
#2 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(460): Wikibase\Repo\WikibaseRepo::newInstance()
#3 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/RepoHooks.php(115): Wikibase\Repo\WikibaseRepo::getDefaultInstance()
#4 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookContainer.php(321): Wikibase\Repo\RepoHooks::onSetupAfterCache()
#5 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#6 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookRunner.php(3417): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/Setup.php(694): MediaWiki\HookContainer\HookRunner->onSetupAfterCache()
#8 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/WebStart.php(89): require_once(string)
#9 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/index.php(44): require(string)
#10 {main}

我该如何解决这个问题?我已经尝试多次更新 Composer 并重新安装它。如果有人可以提供帮助,那就太好了! :)

我遇到了同样的错误,在我的例子中,这是因为我的 compose.local.json(从 composer.local.json-示例复制)指向“扩展/示例/composer.json”而不是“extensions/Wikibase/composer.json”。将此修复到 Wikibase,再次删除 composer.lock、运行 composer install --no-dev,最后 运行 update.php 解决了这个问题。