Merge "Add SPARQL client to core"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 13 Feb 2018 18:22:32 +0000 (18:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 13 Feb 2018 18:22:32 +0000 (18:22 +0000)
890 files changed:
.mailmap
CREDITS
RELEASE-NOTES-1.31
autoload.php
composer.json
docs/distributors.txt
docs/extension.schema.v2.json
docs/hooks.txt
includes/Block.php
includes/CommentStore.php
includes/DefaultSettings.php
includes/Defines.php
includes/EditPage.php
includes/Feed.php
includes/FeedUtils.php
includes/GitInfo.php
includes/GlobalFunctions.php
includes/HistoryBlob.php
includes/Html.php
includes/MediaWiki.php
includes/MediaWikiServices.php
includes/MergeHistory.php
includes/Message.php
includes/MovePage.php
includes/OutputPage.php
includes/Preferences.php
includes/Revision.php
includes/ServiceWiring.php
includes/Setup.php
includes/SiteStats.php
includes/SiteStatsInit.php [new file with mode: 0644]
includes/Storage/RevisionStore.php
includes/StubObject.php
includes/Title.php
includes/WebRequest.php
includes/actions/InfoAction.php
includes/api/ApiBase.php
includes/api/ApiBlock.php
includes/api/ApiCheckToken.php
includes/api/ApiClearHasMsg.php
includes/api/ApiComparePages.php
includes/api/ApiDelete.php
includes/api/ApiDisabled.php
includes/api/ApiEditPage.php
includes/api/ApiEmailUser.php
includes/api/ApiExpandTemplates.php
includes/api/ApiFeedContributions.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiFileRevert.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatFeedWrapper.php
includes/api/ApiFormatJson.php
includes/api/ApiFormatNone.php
includes/api/ApiFormatPhp.php
includes/api/ApiFormatRaw.php
includes/api/ApiFormatXml.php
includes/api/ApiHelp.php
includes/api/ApiHelpParamValueMessage.php
includes/api/ApiImageRotate.php
includes/api/ApiLogin.php
includes/api/ApiLogout.php
includes/api/ApiMain.php
includes/api/ApiMergeHistory.php
includes/api/ApiModuleManager.php
includes/api/ApiMove.php
includes/api/ApiOptions.php
includes/api/ApiPageSet.php
includes/api/ApiParamInfo.php
includes/api/ApiParse.php
includes/api/ApiPatrol.php
includes/api/ApiProtect.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllCategories.php
includes/api/ApiQueryAllDeletedRevisions.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllLinks.php
includes/api/ApiQueryAllMessages.php
includes/api/ApiQueryAllPages.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryBacklinksprop.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryCategories.php
includes/api/ApiQueryCategoryInfo.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQueryContributors.php
includes/api/ApiQueryDeletedRevisions.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryDisabled.php
includes/api/ApiQueryDuplicateFiles.php
includes/api/ApiQueryExtLinksUsage.php
includes/api/ApiQueryExternalLinks.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryGeneratorBase.php
includes/api/ApiQueryIWBacklinks.php
includes/api/ApiQueryIWLinks.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryImages.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryLangBacklinks.php
includes/api/ApiQueryLangLinks.php
includes/api/ApiQueryLinks.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryPagePropNames.php
includes/api/ApiQueryPageProps.php
includes/api/ApiQueryPagesWithProp.php
includes/api/ApiQueryProtectedTitles.php
includes/api/ApiQueryQueryPage.php
includes/api/ApiQueryRandom.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryRevisionsBase.php
includes/api/ApiQuerySearch.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiQueryTags.php
includes/api/ApiQueryTokens.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryUserInfo.php
includes/api/ApiQueryUsers.php
includes/api/ApiQueryWatchlist.php
includes/api/ApiQueryWatchlistRaw.php
includes/api/ApiRevisionDelete.php
includes/api/ApiRollback.php
includes/api/ApiSerializable.php
includes/api/ApiSetNotificationTimestamp.php
includes/api/ApiSetPageLanguage.php
includes/api/ApiTokens.php
includes/api/ApiUnblock.php
includes/api/ApiUndelete.php
includes/api/ApiUpload.php
includes/api/ApiWatch.php
includes/api/i18n/ar.json
includes/api/i18n/cs.json
includes/api/i18n/de.json
includes/api/i18n/en.json
includes/api/i18n/fa.json
includes/api/i18n/fr.json
includes/api/i18n/he.json
includes/api/i18n/hu.json
includes/api/i18n/it.json
includes/api/i18n/ja.json
includes/api/i18n/pt-br.json
includes/api/i18n/pt.json
includes/api/i18n/qqq.json
includes/api/i18n/ru.json
includes/api/i18n/sv.json
includes/api/i18n/zh-hans.json
includes/auth/AuthManager.php
includes/auth/AuthManagerAuthPlugin.php
includes/auth/LegacyHookPreAuthenticationProvider.php
includes/cache/CacheDependency.php
includes/cache/FileCacheBase.php
includes/cache/MessageCache.php
includes/cache/localisation/LocalisationCache.php
includes/changes/CategoryMembershipChange.php
includes/changes/RecentChange.php
includes/changetags/ChangeTags.php
includes/changetags/ChangeTagsList.php
includes/clientpool/SquidPurgeClient.php
includes/clientpool/SquidPurgeClientPool.php
includes/compat/ObjectFactory.php [new file with mode: 0644]
includes/compat/Timestamp.php
includes/compat/normal/UtfNormalUtil.php
includes/config/EtcdConfig.php
includes/context/ContextSource.php
includes/context/DerivativeContext.php
includes/context/IContextSource.php
includes/context/MutableContext.php
includes/context/RequestContext.php
includes/db/DatabaseOracle.php
includes/db/MWLBFactory.php
includes/debug/logger/LegacyLogger.php
includes/debug/logger/LegacySpi.php
includes/debug/logger/LoggerFactory.php
includes/debug/logger/MonologSpi.php
includes/debug/logger/NullSpi.php
includes/deferred/MWCallableUpdate.php
includes/deferred/SiteStatsUpdate.php
includes/diff/DifferenceEngine.php
includes/edit/PreparedEdit.php
includes/exception/MWException.php
includes/exception/MWExceptionHandler.php
includes/exception/MWExceptionRenderer.php
includes/export/WikiExporter.php
includes/export/XmlDumpWriter.php
includes/filebackend/FileBackendGroup.php
includes/filebackend/lockmanager/LockManagerGroup.php
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/ForeignDBRepo.php
includes/filerepo/ForeignDBViaLBRepo.php
includes/filerepo/LocalRepo.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/gallery/ImageGalleryBase.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormElement.php
includes/htmlform/HTMLFormField.php
includes/htmlform/fields/HTMLMultiSelectField.php
includes/htmlform/fields/HTMLRadioField.php
includes/http/CurlHttpRequest.php
includes/http/MWHttpRequest.php
includes/import/ImportStreamSource.php
includes/import/WikiImporter.php
includes/import/WikiRevision.php
includes/installer/DatabaseInstaller.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.php
includes/installer/InstallerOverrides.php
includes/installer/MysqlUpdater.php
includes/installer/SqliteInstaller.php
includes/installer/i18n/af.json
includes/installer/i18n/ar.json
includes/installer/i18n/ast.json
includes/installer/i18n/ba.json
includes/installer/i18n/be-tarask.json
includes/installer/i18n/bg.json
includes/installer/i18n/bn.json
includes/installer/i18n/br.json
includes/installer/i18n/bs.json
includes/installer/i18n/ca.json
includes/installer/i18n/ce.json
includes/installer/i18n/ckb.json
includes/installer/i18n/cs.json
includes/installer/i18n/csb.json
includes/installer/i18n/de-ch.json
includes/installer/i18n/de.json
includes/installer/i18n/dty.json
includes/installer/i18n/el.json
includes/installer/i18n/en-gb.json
includes/installer/i18n/en.json
includes/installer/i18n/eo.json
includes/installer/i18n/es.json
includes/installer/i18n/eu.json
includes/installer/i18n/fa.json
includes/installer/i18n/fi.json
includes/installer/i18n/fo.json
includes/installer/i18n/fr.json
includes/installer/i18n/frc.json
includes/installer/i18n/frp.json
includes/installer/i18n/gl.json
includes/installer/i18n/gsw.json
includes/installer/i18n/he.json
includes/installer/i18n/hi.json
includes/installer/i18n/hrx.json
includes/installer/i18n/hsb.json
includes/installer/i18n/hu-formal.json
includes/installer/i18n/hu.json
includes/installer/i18n/ia.json
includes/installer/i18n/id.json
includes/installer/i18n/is.json
includes/installer/i18n/it.json
includes/installer/i18n/ja.json
includes/installer/i18n/ka.json
includes/installer/i18n/ko.json
includes/installer/i18n/ksh.json
includes/installer/i18n/ku-latn.json
includes/installer/i18n/lb.json
includes/installer/i18n/lij.json
includes/installer/i18n/lki.json
includes/installer/i18n/lt.json
includes/installer/i18n/mg.json
includes/installer/i18n/mk.json
includes/installer/i18n/mr.json
includes/installer/i18n/ms.json
includes/installer/i18n/mzn.json
includes/installer/i18n/nan.json
includes/installer/i18n/nap.json
includes/installer/i18n/nb.json
includes/installer/i18n/nl-informal.json
includes/installer/i18n/nl.json
includes/installer/i18n/oc.json
includes/installer/i18n/pl.json
includes/installer/i18n/pms.json
includes/installer/i18n/ps.json
includes/installer/i18n/pt-br.json
includes/installer/i18n/pt.json
includes/installer/i18n/qqq.json
includes/installer/i18n/ro.json
includes/installer/i18n/ru.json
includes/installer/i18n/sco.json
includes/installer/i18n/sl.json
includes/installer/i18n/sr-ec.json
includes/installer/i18n/sv.json
includes/installer/i18n/te.json
includes/installer/i18n/th.json
includes/installer/i18n/tl.json
includes/installer/i18n/tr.json
includes/installer/i18n/tt-cyrl.json
includes/installer/i18n/uk.json
includes/installer/i18n/vi.json
includes/installer/i18n/war.json
includes/installer/i18n/yi.json
includes/installer/i18n/zh-hans.json
includes/installer/i18n/zh-hant.json
includes/interwiki/Interwiki.php
includes/libs/CryptRand.php
includes/libs/JavaScriptMinifier.php
includes/libs/MultiHttpClient.php
includes/libs/ObjectFactory.php [deleted file]
includes/libs/XhprofData.php
includes/libs/filebackend/FileBackend.php
includes/libs/filebackend/FileBackendMultiWrite.php
includes/libs/filebackend/FileBackendStore.php
includes/libs/filebackend/HTTPFileStreamer.php
includes/libs/filebackend/MemoryFileBackend.php
includes/libs/filebackend/SwiftFileBackend.php
includes/libs/filebackend/fileop/StoreFileOp.php
includes/libs/filebackend/fsfile/FSFile.php
includes/libs/filebackend/fsfile/TempFSFile.php
includes/libs/lockmanager/FSLockManager.php
includes/libs/lockmanager/MemcLockManager.php
includes/libs/mime/MimeAnalyzer.php
includes/libs/mime/XmlTypeCheck.php
includes/libs/objectcache/MemcachedClient.php
includes/libs/objectcache/MultiWriteBagOStuff.php
includes/libs/objectcache/ReplicatedBagOStuff.php
includes/libs/objectcache/WANObjectCache.php
includes/libs/objectcache/XCacheBagOStuff.php [deleted file]
includes/libs/rdbms/TransactionProfiler.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMssql.php
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/DatabaseMysqli.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/DatabaseSqlite.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/database/position/MySQLMasterPos.php
includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php
includes/libs/rdbms/lbfactory/LBFactorySingle.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php
includes/libs/xmp/XMP.php
includes/logging/LogEntry.php
includes/logging/LogPage.php
includes/mail/EmailNotification.php
includes/mail/UserMailer.php
includes/media/Bitmap.php
includes/media/DjVu.php
includes/media/DjVuImage.php
includes/media/Exif.php
includes/media/ExifBitmap.php
includes/media/GIF.php
includes/media/GIFMetadataExtractor.php
includes/media/IPTC.php
includes/media/ImageHandler.php
includes/media/JpegMetadataExtractor.php
includes/media/MediaHandler.php
includes/media/MediaTransformOutput.php
includes/media/PNG.php
includes/media/PNGMetadataExtractor.php
includes/media/SVG.php
includes/media/SVGMetadataExtractor.php
includes/media/WebP.php
includes/media/XCF.php
includes/objectcache/SqlBagOStuff.php
includes/page/Article.php
includes/page/CategoryPage.php
includes/page/WikiPage.php
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Sanitizer.php
includes/password/PasswordFactory.php
includes/poolcounter/PoolWorkArticleView.php
includes/preferences/DefaultPreferencesFactory.php
includes/preferences/PreferencesFactory.php
includes/profiler/Profiler.php
includes/profiler/ProfilerSectionOnly.php
includes/profiler/ProfilerXhprof.php
includes/rcfeed/IRCColourfulRCFeedFormatter.php
includes/registration/ExtensionJsonValidator.php
includes/registration/ExtensionProcessor.php
includes/registration/ExtensionRegistry.php
includes/registration/VersionChecker.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderUserOptionsModule.php
includes/resourceloader/ResourceLoaderUserTokensModule.php
includes/revisiondelete/RevDelLogItem.php
includes/revisiondelete/RevDelLogList.php
includes/revisiondelete/RevisionDeleter.php
includes/search/SearchEngineFactory.php
includes/search/SearchMySQL.php
includes/search/SearchSqlite.php
includes/session/SessionBackend.php
includes/session/SessionManager.php
includes/shell/Command.php
includes/site/SiteList.php
includes/skins/BaseTemplate.php
includes/skins/MediaWikiI18N.php
includes/skins/QuickTemplate.php
includes/skins/Skin.php
includes/skins/SkinApi.php
includes/skins/SkinApiTemplate.php
includes/skins/SkinFallback.php
includes/skins/SkinTemplate.php
includes/specialpage/AuthManagerSpecialPage.php
includes/specialpage/ChangesListSpecialPage.php
includes/specialpage/QueryPage.php
includes/specialpage/SpecialPage.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialBotPasswords.php
includes/specials/SpecialDiff.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialExpandTemplates.php
includes/specials/SpecialExport.php
includes/specials/SpecialLockdb.php
includes/specials/SpecialLog.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialTags.php
includes/specials/SpecialUnlockdb.php
includes/specials/SpecialUserrights.php
includes/specials/forms/UploadForm.php
includes/specials/pagers/BlockListPager.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/DeletedContribsPager.php
includes/specials/pagers/ImageListPager.php
includes/specials/pagers/NewPagesPager.php
includes/specials/pagers/ProtectedPagesPager.php
includes/specials/pagers/UsersPager.php
includes/upload/UploadBase.php
includes/user/CentralIdLookup.php
includes/user/User.php
includes/utils/ExecutableFinder.php
includes/utils/FileContentsHasher.php
includes/utils/UIDGenerator.php
includes/watcheditem/NoWriteWatchedItemStore.php
includes/watcheditem/WatchedItemQueryService.php
includes/watcheditem/WatchedItemStore.php
includes/watcheditem/WatchedItemStoreInterface.php
includes/widget/ComplexNamespaceInputWidget.php
includes/widget/ComplexTitleInputWidget.php
includes/widget/DateInputWidget.php
includes/widget/DateTimeInputWidget.php
includes/widget/NamespaceInputWidget.php
includes/widget/SearchInputWidget.php
includes/widget/SelectWithInputWidget.php
includes/widget/TitleInputWidget.php
includes/widget/UserInputWidget.php
includes/widget/UsersMultiselectWidget.php
jsduck.json
languages/Language.php
languages/LanguageConverter.php
languages/data/Names.php
languages/i18n/af.json
languages/i18n/ais.json
languages/i18n/ar.json
languages/i18n/ast.json
languages/i18n/ba.json
languages/i18n/be-tarask.json
languages/i18n/bg.json
languages/i18n/bho.json
languages/i18n/bn.json
languages/i18n/bqi.json
languages/i18n/bs.json
languages/i18n/ca.json
languages/i18n/ce.json
languages/i18n/ckb.json
languages/i18n/crh-cyrl.json
languages/i18n/crh-latn.json
languages/i18n/cs.json
languages/i18n/csb.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/el.json
languages/i18n/en.json
languages/i18n/eo.json
languages/i18n/es.json
languages/i18n/et.json
languages/i18n/eu.json
languages/i18n/fa.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/gcr.json [new file with mode: 0644]
languages/i18n/gl.json
languages/i18n/got.json
languages/i18n/he.json
languages/i18n/hi.json
languages/i18n/hr.json
languages/i18n/hsb.json
languages/i18n/hu.json
languages/i18n/ia.json
languages/i18n/inh.json
languages/i18n/io.json
languages/i18n/is.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/jv.json
languages/i18n/km.json
languages/i18n/ko.json
languages/i18n/kum.json [new file with mode: 0644]
languages/i18n/lad.json
languages/i18n/lb.json
languages/i18n/li.json
languages/i18n/lij.json
languages/i18n/lrc.json
languages/i18n/lt.json
languages/i18n/lv.json
languages/i18n/mk.json
languages/i18n/ml.json
languages/i18n/mr.json
languages/i18n/mwl.json
languages/i18n/myv.json
languages/i18n/mzn.json
languages/i18n/nap.json
languages/i18n/nb.json
languages/i18n/ne.json
languages/i18n/nl.json
languages/i18n/nn.json
languages/i18n/or.json
languages/i18n/pl.json
languages/i18n/pnb.json
languages/i18n/ps.json
languages/i18n/pt-br.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/ru.json
languages/i18n/sah.json
languages/i18n/sat.json
languages/i18n/sd.json
languages/i18n/sh.json
languages/i18n/sk.json
languages/i18n/skr-arab.json
languages/i18n/sl.json
languages/i18n/sq.json
languages/i18n/sr-ec.json
languages/i18n/sr-el.json
languages/i18n/sty.json [new file with mode: 0644]
languages/i18n/sv.json
languages/i18n/szl.json
languages/i18n/tay.json
languages/i18n/te.json
languages/i18n/tg-cyrl.json
languages/i18n/th.json
languages/i18n/tl.json
languages/i18n/tr.json
languages/i18n/tt-cyrl.json
languages/i18n/tzm.json
languages/i18n/ug-arab.json
languages/i18n/uk.json
languages/i18n/ur.json
languages/i18n/vi.json
languages/i18n/wa.json
languages/i18n/war.json
languages/i18n/yi.json
languages/i18n/yo.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
languages/messages/MessagesGcr.php [new file with mode: 0644]
languages/messages/MessagesKum.php [new file with mode: 0644]
languages/messages/MessagesSty.php [new file with mode: 0644]
languages/messages/MessagesTr.php
languages/messages/MessagesUk.php
maintenance/Maintenance.php
maintenance/benchmarks/Benchmarker.php
maintenance/benchmarks/README [deleted file]
maintenance/benchmarks/README.md [new file with mode: 0644]
maintenance/benchmarks/benchmarkJSMinPlus.php
maintenance/benchmarks/benchmarkLruHash.php
maintenance/benchmarks/benchmarkSanitizer.php [new file with mode: 0644]
maintenance/cleanupPreferences.php
maintenance/cleanupTitles.php
maintenance/convertExtensionToRegistration.php
maintenance/dictionary/mediawiki.dic
maintenance/dumpTextPass.php
maintenance/findHooks.php
maintenance/importImages.php
maintenance/install.php
maintenance/interwiki.list
maintenance/interwiki.sql
maintenance/jsparse.php
maintenance/language/StatOutputs.php
maintenance/language/digit2html.php
maintenance/language/generateCollationData.php
maintenance/orphans.php
maintenance/rebuildFileCache.php
maintenance/rebuildrecentchanges.php
maintenance/resources/update-oojs-ui.sh
maintenance/sqlite.php
maintenance/storage/fixT22757.php
maintenance/storage/recompressTracked.php
resources/Resources.php
resources/lib/oojs-ui/i18n/az.json
resources/lib/oojs-ui/i18n/is.json
resources/lib/oojs-ui/i18n/lzh.json
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-core-apex.css
resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-core.js
resources/lib/oojs-ui/oojs-ui-core.js.map
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-toolbars.js
resources/lib/oojs-ui/oojs-ui-toolbars.js.map
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-widgets.js
resources/lib/oojs-ui/oojs-ui-widgets.js.map
resources/lib/oojs-ui/oojs-ui-wikimediaui.js
resources/lib/oojs-ui/oojs-ui-windows-apex.css
resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css
resources/lib/oojs-ui/oojs-ui-windows.js
resources/lib/oojs-ui/themes/apex/indicators.json
resources/lib/oojs-ui/themes/wikimediaui/indicators.json
resources/src/jquery/jquery.localize.js
resources/src/jquery/jquery.textSelection.js
resources/src/mediawiki.action/mediawiki.action.edit.preview.js
resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
resources/src/mediawiki.language/specialcharacters.json
resources/src/mediawiki.legacy/commonPrint.css
resources/src/mediawiki.less/mediawiki.ui/variables.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
resources/src/mediawiki.special/mediawiki.special.apisandbox.css
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
resources/src/mediawiki.special/mediawiki.special.changeslist.css
resources/src/mediawiki.special/mediawiki.special.unwatchedPages.js
resources/src/mediawiki.special/mediawiki.special.upload.js
resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
resources/src/mediawiki.special/mediawiki.special.watchlist.js
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
resources/src/mediawiki.widgets.datetime/mediawiki.widgets.datetime.definitions.less
resources/src/mediawiki.widgets.visibleByteLimit/mediawiki.widgets.visibleByteLimit.js
resources/src/mediawiki.widgets/mw.widgets.CategoryMultiselectWidget.js
resources/src/mediawiki/api/category.js
resources/src/mediawiki/api/edit.js
resources/src/mediawiki/htmlform/autoinfuse.js
resources/src/mediawiki/htmlform/htmlform.Element.js
resources/src/mediawiki/mediawiki.Title.js
resources/src/mediawiki/mediawiki.feedback.js
resources/src/oojs-ui-local.css
resources/src/oojs-ui-local.js
tests/common/TestSetup.php
tests/integration/includes/http/MWHttpRequestTestCase.php
tests/parser/ParserTestResultNormalizer.php
tests/parser/ParserTestRunner.php
tests/parser/editTests.php
tests/parser/fuzzTest.php
tests/parser/parserTests.txt
tests/phan/config.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/ResourceLoaderTestCase.php
tests/phpunit/autoload.ide.php
tests/phpunit/data/registration/bad_spdx.json [new file with mode: 0644]
tests/phpunit/data/registration/good.json [new file with mode: 0644]
tests/phpunit/data/registration/invalid.json [new file with mode: 0644]
tests/phpunit/data/registration/newer_manifest_version.json [new file with mode: 0644]
tests/phpunit/data/registration/no_manifest_version.json [new file with mode: 0644]
tests/phpunit/data/registration/notjson.txt [new file with mode: 0644]
tests/phpunit/data/registration/old_manifest_version.json [new file with mode: 0644]
tests/phpunit/includes/AutopromoteTest.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/CommentStoreTest.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/ExtraParserTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/LicensesTest.php
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/ListToggleTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/MWTimestampTest.php
tests/phpunit/includes/MediaWikiServicesTest.php
tests/phpunit/includes/MergeHistoryTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/PageArchiveTest.php
tests/phpunit/includes/PrefixSearchTest.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/SampleTest.php
tests/phpunit/includes/StatusTest.php
tests/phpunit/includes/Storage/RevisionStoreDbTest.php
tests/phpunit/includes/Storage/RevisionStoreTest.php
tests/phpunit/includes/Storage/SqlBlobStoreTest.php
tests/phpunit/includes/TemplateParserTest.php
tests/phpunit/includes/TitleArrayFromResultTest.php
tests/phpunit/includes/TitleMethodsTest.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/WebRequestTest.php
tests/phpunit/includes/WikiReferenceTest.php
tests/phpunit/includes/XmlTest.php
tests/phpunit/includes/actions/ActionTest.php
tests/phpunit/includes/api/ApiContinuationManagerTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/api/ApiErrorFormatterTest.php
tests/phpunit/includes/api/ApiLoginTest.php
tests/phpunit/includes/api/ApiMainTest.php
tests/phpunit/includes/api/ApiModuleManagerTest.php
tests/phpunit/includes/api/ApiOpenSearchTest.php
tests/phpunit/includes/api/ApiOptionsTest.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/format/ApiFormatBaseTest.php
tests/phpunit/includes/api/format/ApiFormatRawTest.php
tests/phpunit/includes/api/query/ApiQueryBasicTest.php
tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
tests/phpunit/includes/api/query/ApiQueryTest.php
tests/phpunit/includes/api/query/ApiQueryTestBase.php
tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php
tests/phpunit/includes/auth/AuthManagerTest.php
tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php
tests/phpunit/includes/auth/AuthenticationRequestTest.php
tests/phpunit/includes/auth/AuthenticationRequestTestCase.php
tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php
tests/phpunit/includes/auth/EmailNotificationSecondaryAuthenticationProviderTest.php
tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php
tests/phpunit/includes/auth/PasswordAuthenticationRequestTest.php
tests/phpunit/includes/auth/PasswordDomainAuthenticationRequestTest.php
tests/phpunit/includes/auth/TemporaryPasswordAuthenticationRequestTest.php
tests/phpunit/includes/auth/ThrottlePreAuthenticationProviderTest.php
tests/phpunit/includes/cache/LocalisationCacheTest.php
tests/phpunit/includes/changes/CategoryMembershipChangeTest.php
tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php
tests/phpunit/includes/changes/RCCacheEntryFactoryTest.php
tests/phpunit/includes/changes/RecentChangeTest.php
tests/phpunit/includes/composer/ComposerVersionNormalizerTest.php
tests/phpunit/includes/config/ConfigFactoryTest.php
tests/phpunit/includes/config/GlobalVarConfigTest.php
tests/phpunit/includes/config/HashConfigTest.php
tests/phpunit/includes/config/MultiConfigTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/CssContentHandlerTest.php
tests/phpunit/includes/content/FileContentHandlerTest.php
tests/phpunit/includes/content/JavaScriptContentHandlerTest.php
tests/phpunit/includes/content/JsonContentTest.php
tests/phpunit/includes/content/TextContentHandlerTest.php
tests/phpunit/includes/content/TextContentTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/content/WikitextContentTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTestHelper.php
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/db/LoadBalancerTest.php
tests/phpunit/includes/debug/MWDebugTest.php
tests/phpunit/includes/debug/logger/monolog/AvroFormatterTest.php
tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php
tests/phpunit/includes/deferred/MWCallableUpdateTest.php
tests/phpunit/includes/diff/ArrayDiffFormatterTest.php
tests/phpunit/includes/exception/BadTitleErrorTest.php
tests/phpunit/includes/exception/ErrorPageErrorTest.php
tests/phpunit/includes/exception/MWExceptionTest.php
tests/phpunit/includes/exception/ThrottledErrorTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
tests/phpunit/includes/filerepo/FileBackendDBRepoWrapperTest.php
tests/phpunit/includes/filerepo/FileRepoTest.php
tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
tests/phpunit/includes/filerepo/RepoGroupTest.php
tests/phpunit/includes/filerepo/file/FileTest.php
tests/phpunit/includes/filerepo/file/LocalFileTest.php
tests/phpunit/includes/htmlform/HTMLCheckMatrixTest.php
tests/phpunit/includes/http/HttpTest.php
tests/phpunit/includes/installer/OracleInstallerTest.php
tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php
tests/phpunit/includes/interwiki/InterwikiTest.php
tests/phpunit/includes/jobqueue/JobQueueMemoryTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/jobqueue/JobTest.php
tests/phpunit/includes/json/FormatJsonTest.php
tests/phpunit/includes/libs/ArrayUtilsTest.php
tests/phpunit/includes/libs/DeferredStringifierTest.php
tests/phpunit/includes/libs/IPTest.php
tests/phpunit/includes/libs/JavaScriptMinifierTest.php
tests/phpunit/includes/libs/MemoizedCallableTest.php
tests/phpunit/includes/libs/ObjectFactoryTest.php [deleted file]
tests/phpunit/includes/libs/XhprofTest.php
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
tests/phpunit/includes/libs/rdbms/TransactionProfilerTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseMysqlBaseTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
tests/phpunit/includes/logging/LogFormatterTest.php
tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
tests/phpunit/includes/logging/PageLangLogFormatterTest.php
tests/phpunit/includes/mail/MailAddressTest.php
tests/phpunit/includes/media/BitmapScalingTest.php
tests/phpunit/includes/media/FormatMetadataTest.php
tests/phpunit/includes/media/PNGMetadataExtractorTest.php
tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
tests/phpunit/includes/objectcache/ObjectCacheTest.php
tests/phpunit/includes/objectcache/RESTBagOStuffTest.php
tests/phpunit/includes/objectcache/RedisBagOStuffTest.php
tests/phpunit/includes/page/WikiPageContentHandlerDbTest.php
tests/phpunit/includes/page/WikiPageDbTestBase.php
tests/phpunit/includes/pager/RangeChronologicalPagerTest.php
tests/phpunit/includes/pager/ReverseChronologicalPagerTest.php
tests/phpunit/includes/parser/ParserIntegrationTest.php
tests/phpunit/includes/parser/ParserMethodsTest.php
tests/phpunit/includes/parser/ParserOptionsTest.php
tests/phpunit/includes/parser/ParserOutputTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/includes/parser/SanitizerTest.php
tests/phpunit/includes/parser/TagHooksTest.php
tests/phpunit/includes/password/BcryptPasswordTest.php
tests/phpunit/includes/password/EncryptedPasswordTest.php
tests/phpunit/includes/password/LayeredParameterizedPasswordTest.php
tests/phpunit/includes/password/MWOldPasswordTest.php
tests/phpunit/includes/password/MWSaltedPasswordTest.php
tests/phpunit/includes/password/PasswordFactoryTest.php
tests/phpunit/includes/password/PasswordTest.php
tests/phpunit/includes/password/Pbkdf2PasswordFallbackTest.php
tests/phpunit/includes/password/Pbkdf2PasswordTest.php
tests/phpunit/includes/poolcounter/PoolCounterTest.php
tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php
tests/phpunit/includes/registration/ExtensionJsonValidatorTest.php [new file with mode: 0644]
tests/phpunit/includes/registration/ExtensionProcessorTest.php
tests/phpunit/includes/registration/ExtensionRegistryTest.php
tests/phpunit/includes/registration/VersionCheckerTest.php
tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderOOUIImageModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php
tests/phpunit/includes/search/SearchEnginePrefixTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/includes/services/ServiceContainerTest.php
tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
tests/phpunit/includes/session/CookieSessionProviderTest.php
tests/phpunit/includes/session/ImmutableSessionProviderWithCookieTest.php
tests/phpunit/includes/session/MetadataMergeExceptionTest.php
tests/phpunit/includes/session/PHPSessionHandlerTest.php
tests/phpunit/includes/session/SessionBackendTest.php
tests/phpunit/includes/session/SessionManagerTest.php
tests/phpunit/includes/session/SessionTest.php
tests/phpunit/includes/session/TestBagOStuff.php
tests/phpunit/includes/session/UserInfoTest.php
tests/phpunit/includes/site/CachingSiteStoreTest.php
tests/phpunit/includes/site/DBSiteStoreTest.php
tests/phpunit/includes/site/FileBasedSiteLookupTest.php
tests/phpunit/includes/site/SiteExporterTest.php
tests/phpunit/includes/site/SiteImporterTest.php
tests/phpunit/includes/site/SiteTest.php
tests/phpunit/includes/site/SitesCacheFileBuilderTest.php
tests/phpunit/includes/skins/SkinFactoryTest.php
tests/phpunit/includes/skins/SkinTemplateTest.php
tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
tests/phpunit/includes/specialpage/SpecialPageTest.php
tests/phpunit/includes/specials/ImageListPagerTest.php
tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php
tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
tests/phpunit/includes/specials/SpecialPreferencesTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php
tests/phpunit/includes/specials/SpecialUncategorizedcategoriesTest.php
tests/phpunit/includes/specials/SpecialWatchlistTest.php
tests/phpunit/includes/title/ForeignTitleTest.php
tests/phpunit/includes/title/MediaWikiTitleCodecTest.php
tests/phpunit/includes/title/SubpageImportTitleFactoryTest.php
tests/phpunit/includes/title/TitleValueTest.php
tests/phpunit/includes/upload/UploadStashTest.php
tests/phpunit/includes/user/BotPasswordTest.php
tests/phpunit/includes/user/CentralIdLookupTest.php
tests/phpunit/includes/user/UserArrayFromResultTest.php
tests/phpunit/includes/user/UserTest.php
tests/phpunit/includes/utils/BatchRowUpdateTest.php
tests/phpunit/includes/utils/ClassCollectorTest.php
tests/phpunit/includes/utils/MWRestrictionsTest.php
tests/phpunit/includes/utils/UIDGeneratorTest.php
tests/phpunit/includes/watcheditem/WatchedItemQueryServiceUnitTest.php
tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php
tests/phpunit/includes/watcheditem/WatchedItemStoreUnitTest.php
tests/phpunit/maintenance/MaintenanceBaseTestCase.php
tests/phpunit/maintenance/backupTextPassTest.php
tests/phpunit/structure/ApiStructureTest.php
tests/phpunit/structure/AutoLoaderTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php
tests/phpunit/tests/MediaWikiTestCaseTest.php
tests/qunit/QUnitTestResources.php
tests/qunit/data/testrunner.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.edit.test.js
thumb.php

index c101be3..08e1aaa 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -167,6 +167,7 @@ Gabriel Wicke <gwicke@wikimedia.org>
 Gabriel Wicke <gwicke@wikimedia.org> <gwicke@users.mediawiki.org>
 Gabriel Wicke <gwicke@wikimedia.org> <wicke@wikidev.net>
 Geoffrey Mon <geofbot@gmail.com>
+Geoffrey Trang <geoffreytrang@gmail.com>
 Gergő Tisza <gtisza@wikimedia.org>
 Gergő Tisza <gtisza@wikimedia.org> <tgr.huwiki@gmail.com>
 Giftpflanze <gifti@tools.wmflabs.org>
@@ -196,7 +197,7 @@ Jack Phoenix <jack@countervandalism.net> <ashley@users.mediawiki.org>
 Jackmcbarn <jackmcbarn@gmail.com>
 Jackmcbarn <jackmcbarn@gmail.com> <jackmcbarn@users.noreply.github.com>
 jagori <jagori79@gmail.com>
-James Forrester <jforrester@wikimedia.org>
+James D. Forrester <jforrester@wikimedia.org>
 Jaime Crespo <jcrespo@wikimedia.org>
 Jan Gerber <j@thing.net> <j@users.mediawiki.org>
 Jan Luca Naumann <jan@jans-seite.de>
@@ -278,6 +279,7 @@ Matt Johnston <mattj@emazestudios.com> <mattj@users.mediawiki.org>
 Matthew Britton <hugglegurch@gmail.com> <gurch@users.mediawiki.org>
 Matthew Flaschen <mflaschen@wikimedia.org>
 Matthew Walker <mwalker@wikimedia.org>
+MatthiasDD <Matthias_K2@gmx.de>
 Matthias Mullie <git@mullie.eu>
 Matthias Mullie <git@mullie.eu> <mmullie@wikimedia.org>
 Matěj Grabovský <mgrabovsky@yahoo.com> <mgrabovsky@users.mediawiki.org>
@@ -330,6 +332,7 @@ Philip Tzou <philip.npc@gmail.com> <philip@users.mediawiki.org>
 physikerwelt (Moritz Schubotz) <wiki@physikerwelt.de>
 PiRSquared17 <pirsquared@tools.wmflabs.org>
 Platonides <platonides@gmail.com> <platonides@users.mediawiki.org>
+pppery <mapreader@olum.org>
 PranavK <pranavmk98@gmail.com>
 Prateek Saxena <psaxena@wikimedia.org>
 Prateek Saxena <psaxena@wikimedia.org> <prtksxna@gmail.com>
@@ -451,6 +454,7 @@ Victor Vasiliev <vasilvv@mit.edu> <vasilievvv@users.mediawiki.org>
 Victor Vasiliev <vasilvv@mit.edu> <vasilvv@gmail.com>
 Vikas S Yaligar <vikasyaligar.it@gmail.com>
 Vivek Ghaisas <v.a.ghaisas@gmail.com>
+Volker E <volker.e@wikimedia.org>
 wctaiwan <wctaiwan@gmail.com>
 withoutaname <drevitchi@gmail.com>
 X! <soxred93@gmail.com> <soxred93@users.mediawiki.org>
diff --git a/CREDITS b/CREDITS
index ea011e8..95d6a6c 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1,5 +1,5 @@
 {{int:version-credits-summary}} <!--
-MediaWiki 1.29 is a collaborative project released under the
+MediaWiki 1.31 is a collaborative project released under the
 GNU General Public License v2. We would like to recognize the
 following names for their contribution to the product.
 
@@ -38,6 +38,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Alex Z.
 * Alexander I. Mashin
 * Alexander Lehmann
+* Alexander Mashin
 * Alexander Monk
 * Alexander Sigachov
 * Alexandre Emsenhuber
@@ -62,6 +63,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Angela Beesley Starling
 * ankur
 * Antoine Musso
+* Antoni Siek
 * Antonio Ospite
 * apexkid
 * April King
@@ -134,6 +136,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Cindy Cicalese
 * ckoerner
 * Conrad Irwin
+* Cormac Parle
 * cryptocoryne
 * Dan Barrett
 * Dan Collins
@@ -156,6 +159,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Darkdragon09
 * DaSch
 * datguy
+* David Barratt
 * David Baumgarten
 * David Causse
 * David Chan
@@ -163,6 +167,8 @@ The following list can be found parsed under Special:Version/Credits -->
 * David Lynch
 * David McCabe
 * David Mudrák
+* David Sn
+* Dayllan Maza
 * dcausse
 * dennisroczek
 * Denny Vrandecic
@@ -170,10 +176,12 @@ The following list can be found parsed under Special:Version/Credits -->
 * Derk-Jan Hartman
 * Derric Atzrott
 * Derrick Coetzee
+* Deskana
 * Dévai Tamás
 * Devi Krishnan
 * Diederik van Liere
 * divadsn
+* Dmaza
 * Domas Mituzas
 * Douglas Gardner
 * DPStokesNZ
@@ -183,6 +191,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Eddie Greiner-Petter
 * Edward Chernenko
 * Edward Z. Yang
+* Egbe Eugene
 * Elisabeth Bauer
 * Elliott Eggleston
 * Elvis Stansvik
@@ -194,6 +203,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Emufarmers
 * enigmaeth
 * Entlinkt
+* Envel Le Hir
 * Eranroz
 * Eric Evans
 * Eric Schneider
@@ -209,10 +219,13 @@ The following list can be found parsed under Special:Version/Credits -->
 * ExplosiveHippo
 * Faidon Liambotis
 * Federico Leva
+* Felipe L. Ewald
 * Fenzik Joseph
+* Filippo Giunchedi
 * firebus
 * Florian Schmidt
 * fomafix
+* Framawiki
 * Fran Rogers
 * Fred Emmott
 * FunPika
@@ -220,6 +233,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Gary Guo
 * gbt248
 * Geoffrey Mon
+* GeoffreyT2000
 * georggi
 * Gergő Tisza
 * Gero Scholz
@@ -231,6 +245,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Giuseppe Lavagetto
 * gladoscc
 * glaisher
+* golopot
 * Greg Maxwell
 * Greg Sabino Mullane
 * Gregory Szorc
@@ -246,9 +261,11 @@ The following list can be found parsed under Special:Version/Credits -->
 * Helder
 * Henning Snater
 * Hojjat
+* Hoto Cocoa
 * Huji
 * Hydriz
 * Ian Baker
+* Ian Marlier
 * Ilmari Karonen
 * Inez Korczyński
 * IoannisKydonis
@@ -264,7 +281,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Jaime Crespo
 * Jakub Vrana
 * James Earl Douglas
-* James Forrester
+* James D. Forrester
 * Jan Berkel
 * Jan Drewniak
 * Jan Gerber
@@ -277,6 +294,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * jarry1250
 * Jaska Zedlik
 * Jason Richey
+* Jayprakash12345
 * jeblad
 * Jeff Hobson
 * Jeff Janes
@@ -291,6 +309,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Jerome Jamnicky
 * Jesús Martínez Novo
 * jhobs
+* jhsoby
 * Jiabao
 * Jidanni
 * Jimmy Collins
@@ -307,11 +326,13 @@ The following list can be found parsed under Special:Version/Credits -->
 * John N
 * Jon Harald Søby
 * Jon Robson
+* Jonathan
 * Jonathan Wiltshire
 * Jools Wills
 * jsahleen
 * Julian Ostrow
 * Juliano F. Ravasi
+* Julien Girault
 * Juliusz Gonera
 * Jure Kajzer
 * Justin Du
@@ -321,6 +342,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Kartik Mistry
 * Karun Dambiec
 * Katie Filbert
+* KeerthanaS
 * Kevin Israel
 * Kghbln
 * Kim Eik
@@ -372,6 +394,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * madurangasiriwardena
 * Magnus Manske
 * mainframe98
+* Mako Bates
 * Manuel Menal
 * Manuel Schneider
 * Marc Ordinas i Llopis
@@ -381,6 +404,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Marco Schuster
 * MarcoAurelio
 * Marcus Buck
+* Margaret Epps
 * Marius Hoch
 * Mark Bergsma
 * Mark Clements
@@ -410,6 +434,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Max Semenik
 * Max Sikström
 * mayankmadan
+* Mehmet Mert Yıldıran
 * Meno25
 * merl
 * Merlijn S. van Deen
@@ -473,6 +498,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * nullspoon
 * Nuria Ruiz
 * Nx.devnull
+* Obaid Raza
 * Ocean behind ears
 * Od1n
 * Olaf Lenz
@@ -496,6 +522,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Pavel Selitskas
 * Pcoombe
 * Perside Rosalie
+* petarpetkovic
 * Peter Coombe
 * Peter Gehres
 * Peter Hedenskog
@@ -509,6 +536,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * physikerwelt (Moritz Schubotz)
 * PieRRoMaN
 * Pikne
+* Piotr Miazga
 * PiRSquared17
 * Platonides
 * Pmlineditor
@@ -529,6 +557,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * rahul21
 * Raimond Spekking
 * Ramunas Geciauskas
+* RazeSoldier
 * Remember the dot
 * René Kijewski
 * Reza
@@ -564,6 +593,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Ryan Kaldari
 * Ryan Lane
 * Ryan Schmidt
+* ryan10145
 * S Page
 * Salvatore Ingala
 * Sam Reed
@@ -583,6 +613,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Sébastien Santoro
 * Sergio Santoro
 * Sethakill
+* Sfic
 * Shahyar
 * Shane Gibbons
 * Shane King
@@ -591,6 +622,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * shirayuki
 * Sidhant Gupta
 * Siebrand Mazeland
+* Simeon Dahl
 * Simon Walker
 * Smriti Singh
 * Solitarius
@@ -614,6 +646,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Subin Siby
 * Subramanya Sastry
 * Sumit Asthana
+* Suriyaa Kudo
 * svip
 * Szymon Świerkosz
 * T.D. Corell
@@ -663,12 +696,14 @@ The following list can be found parsed under Special:Version/Credits -->
 * UltrasonicNXT
 * Umherirrender
 * utkarsh95
+* Valerio Bozzolan
 * Van de Bugger
 * Viačeslav
 * Victor Barbu
 * Victor Porton
 * Victor Vasiliev
 * Ville Stadista
+* vinithegit
 * vishnu
 * Vitaliy Filippov
 * Vivek Ghaisas
@@ -700,6 +735,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Zhaofeng Li
 * Zhengzhu Feng
 * Zhuyifei1999
+* zoranzoki21
 * Zppix
 * محمد شعیب
 <!-- END CONTRIBUTOR LIST -->
index 5e14aee..cc08b33 100644 (file)
@@ -24,6 +24,8 @@ production.
 * $wgFragmentMode is now set to [ 'legacy', 'html5' ] by default. This is a first step of
   migration to human-readable section IDs that will later result in 'html5' being the
   default mode.
+* CACHE_ACCEL now only supports APC(u) or WinCache. XCache support was removed
+  as upstream is inactive and has no plans to move to PHP 7.
 
 === New features in 1.31 ===
 * Wikimedia\Rdbms\IDatabase->select() and similar methods now support
@@ -42,24 +44,29 @@ production.
   the ParserOutput::getText() post-cache transformations.
 * Added a hook, UploadForm:getInitialPageText, to allow extensions to alter the
   initial page text for file uploads.
-* (T181651) The info page for File pages now displays the file's base-36 SHA1
+* (T181651) The info page for File pages now displays the file's base-16 SHA1
   hash value in the table of basic information.
+* Style tags with a 'data-mw-deduplicate' attribute will be deduplicated as a
+  ParserOutput::getText() post-cache transformation. This may be disabled by
+  passing 'deduplicateStyles' => false to that method.
 
 === External library changes in 1.31 ===
 
 ==== Upgraded external libraries ====
 * Updated jquery.chosen from v0.9.14 to v1.8.2.
 * Updated composer/spdx-licenses from 1.1.4 to
-  1.2.0 (development dependency).
+  1.3.0 (development dependency).
 * Updated nikic/php-parser from 2.1.0 to 3.1.3
   (development dependency).
 * Updated wikimedia/ip-set from 1.1.0 to 1.2.0.
 * Updated wikimedia/relpath from 2.0.0 to 2.1.1.
 * Updated wikimedia/running-stat from 1.1.0 to 1.2.0.
 * Updated wikimedia/wrappedstring from 2.2.0 to 2.3.0.
+* Updated mediawiki/at-ease from 1.1.0 to 1.2.0.
 * …
 
 ==== New external libraries ====
+* Added wikimedia/object-factory 1.0.0
 * …
 
 ==== Removed and replaced external libraries ====
@@ -90,6 +97,9 @@ changes to languages because of Phabricator reports.
 
 * (T180052) Mirandese (mwl) now supports gendered NS_USER/NS_USER_TALK namespaces.
 * (T182305) New language support: Nyungar (nys).
+* (T186359) New language support: Siberian Tatar [cебертатар] (sty).
+* (T186635) New language support: Guianan Creole (gcr).
+* (T186647) New language support: Kumyk [къумукъ] (kum).
 
 === Other changes in 1.31 ===
 * Introducing multi-content-revision capability into the storage layer. For details,
@@ -186,6 +196,43 @@ changes to languages because of Phabricator reports.
 * The driver 'mysql' for MySQL, deprecated in MediaWiki 1.30, has been removed.
   The driver has been deprecated since PHP 5.5 and was removed in PHP 7.0. The
   default driver for MySQL has been 'mysqli' since MediaWiki 1.22.
+* The following properties of PreparedEdit were deprecated in 1.21 and have been removed:
+  * PreparedEdit->newText
+  * PreparedEdit->oldText
+  * PreparedEdit->pst
+* QuickTemplate::setRef() was deprecated in favour of QuickTemplate::set().
+  Setting template variables by reference allowed violating the principle of data being
+  immutable once added to the skin template. In practice, this method was not being
+  used for that. Rather, setRef() existed as memory optimisation for PHP 4.
+* QuickTemplate::setTranslator() was deprecated in favour of Skin::msg() parameters.
+* MediaWikiI18N::set() was deprecated in favour of Skin::msg() parameters.
+* MediaWikiI18N::translate() was deprecated in favour of Skin::msg() or wfMessage().
+* Passing false to ParserOptions::setWrapOutputClass() is deprecated. Use the
+  'unwrap' transform to ParserOutput::getText() instead.
+* ParserOutput objects generated using a non-default value for
+  ParserOptions::setWrapOutputClass() can no longer be added to the parser
+  cache.
+* The following deprecated methods from the OutputPage class have been removed:
+  * OutputPage::addExtensionStyle(); deprecated in 1.27
+  * OutputPage::getExtStyle(); deprecated in 1.27
+  * OutputPage::setETag(); deprecated in 1.28 (obsolete no-op)
+  * OutputPage::setSquidMaxage(); deprecated in 1.27
+  * OutputPage::readOnlyPage(); deprecated in 1.25
+  * OutputPage::rateLimited(); deprecated in 1.25
+  * Additionally, the protected OutputPage::$mExtStyles array, only accessed through
+    the above and with no known uses, was removed.
+* The no-op method Skin::showIPinHeader(), deprecated in 1.27, was removed.
+* \ObjectFactory (no namespace) is deprecated, the namespaced \Wikimedia\ObjectFactory
+  from the wikimedia/object-factory library should be used instead.
+* CommentStore::newKey is deprecated. Get an instance from MediaWikiServices instead.
+* The following CommentStore methods have had their signatures changed to introduce a $key parameter,
+  usage of the methods on instances retrieved from CommentStore::newKey will remain unchanged but deprecated:
+  * CommentStore::getFields
+  * CommentStore::getJoin
+  * CommentStore::getComment
+  * CommentStore::getCommentLegacy
+  * CommentStore::insert
+  * CommentStore::insertWithTemplate
 
 == Compatibility ==
 MediaWiki 1.31 requires PHP 5.5.9 or later. Although HHVM 3.18.5 or later is supported,
index 7f1a47f..fc77fcb 100644 (file)
@@ -197,6 +197,7 @@ $wgAutoloadLocalClasses = [
        'BenchmarkLruHash' => __DIR__ . '/maintenance/benchmarks/benchmarkLruHash.php',
        'BenchmarkParse' => __DIR__ . '/maintenance/benchmarks/benchmarkParse.php',
        'BenchmarkPurge' => __DIR__ . '/maintenance/benchmarks/benchmarkPurge.php',
+       'BenchmarkSanitizer' => __DIR__ . '/maintenance/benchmarks/benchmarkSanitizer.php',
        'BenchmarkTidy' => __DIR__ . '/maintenance/benchmarks/benchmarkTidy.php',
        'Benchmarker' => __DIR__ . '/maintenance/benchmarks/Benchmarker.php',
        'BitmapHandler' => __DIR__ . '/includes/media/Bitmap.php',
@@ -1071,7 +1072,7 @@ $wgAutoloadLocalClasses = [
        'ORAField' => __DIR__ . '/includes/db/ORAField.php',
        'ORAResult' => __DIR__ . '/includes/db/ORAResult.php',
        'ObjectCache' => __DIR__ . '/includes/objectcache/ObjectCache.php',
-       'ObjectFactory' => __DIR__ . '/includes/libs/ObjectFactory.php',
+       'ObjectFactory' => __DIR__ . '/includes/compat/ObjectFactory.php',
        'OldChangesList' => __DIR__ . '/includes/changes/OldChangesList.php',
        'OldLocalFile' => __DIR__ . '/includes/filerepo/file/OldLocalFile.php',
        'OracleInstaller' => __DIR__ . '/includes/installer/OracleInstaller.php',
@@ -1362,7 +1363,7 @@ $wgAutoloadLocalClasses = [
        'SiteLookup' => __DIR__ . '/includes/site/SiteLookup.php',
        'SiteSQLStore' => __DIR__ . '/includes/site/SiteSQLStore.php',
        'SiteStats' => __DIR__ . '/includes/SiteStats.php',
-       'SiteStatsInit' => __DIR__ . '/includes/SiteStats.php',
+       'SiteStatsInit' => __DIR__ . '/includes/SiteStatsInit.php',
        'SiteStatsUpdate' => __DIR__ . '/includes/deferred/SiteStatsUpdate.php',
        'SiteStore' => __DIR__ . '/includes/site/SiteStore.php',
        'SitesCacheFileBuilder' => __DIR__ . '/includes/site/SitesCacheFileBuilder.php',
@@ -1721,7 +1722,6 @@ $wgAutoloadLocalClasses = [
        'WordLevelDiff' => __DIR__ . '/includes/diff/WordLevelDiff.php',
        'WrapOldPasswords' => __DIR__ . '/maintenance/wrapOldPasswords.php',
        'XCFHandler' => __DIR__ . '/includes/media/XCF.php',
-       'XCacheBagOStuff' => __DIR__ . '/includes/libs/objectcache/XCacheBagOStuff.php',
        'XMLRCFeedFormatter' => __DIR__ . '/includes/rcfeed/XMLRCFeedFormatter.php',
        'XMPInfo' => __DIR__ . '/includes/libs/xmp/XMPInfo.php',
        'XMPReader' => __DIR__ . '/includes/libs/xmp/XMP.php',
index 4596c4c..c3ff8d6 100644 (file)
@@ -24,8 +24,8 @@
                "ext-mbstring": "*",
                "ext-xml": "*",
                "liuggio/statsd-php-client": "1.0.18",
-               "mediawiki/at-ease": "1.1.0",
-               "oojs/oojs-ui": "0.25.1",
+               "mediawiki/at-ease": "1.2.0",
+               "oojs/oojs-ui": "0.25.2",
                "oyejorge/less.php": "1.7.0.14",
                "php": ">=5.5.9",
                "psr/log": "1.0.2",
@@ -36,6 +36,7 @@
                "wikimedia/composer-merge-plugin": "1.4.1",
                "wikimedia/html-formatter": "1.0.1",
                "wikimedia/ip-set": "1.2.0",
+               "wikimedia/object-factory": "1.0.0",
                "wikimedia/php-session-serializer": "1.0.4",
                "wikimedia/purtle": "1.0.6",
                "wikimedia/relpath": "2.1.1",
@@ -49,7 +50,7 @@
                "zordius/lightncandy": "0.23"
        },
        "require-dev": {
-               "composer/spdx-licenses": "1.2.0",
+               "composer/spdx-licenses": "1.3.0",
                "hamcrest/hamcrest-php": "^2.0",
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
index f19574c..7581110 100644 (file)
@@ -162,14 +162,14 @@ There are several other pieces of software that MediaWiki can make good use of.
 Distributors might choose to install these automatically with MediaWiki and
 perhaps configure it to use them (see Configuration section of this document):
 
-  * APC (Alternative PHP Cache), XCache, or similar: Will greatly speed up the
+  * APC (Alternative PHP Cache) or similar: Will greatly speed up the
   execution of MediaWiki, and all other PHP applications, at some cost in
   memory usage. Will be used automatically for the most part.
   * clamav: Can be used for virus scanning of uploaded files. Enable with
   "$wgAntivirus = 'clamav';".
   * DjVuLibre: Allows processing of DjVu files. To enable this, set
   "$wgDjvuDump = 'djvudump'; $wgDjvuRenderer = 'ddjvu'; $wgDjvuTxt = 'djvutxt';".
-  * HTML Tidy: Fixes errors in HTML at runtime. Can be enabled with 
+  * HTML Tidy: Fixes errors in HTML at runtime. Can be enabled with
        "$wgUseTidy = true;".
   * ImageMagick: For resizing images. "$wgUseImageMagick = true;" will enable
   it. PHP's GD can also be used, but ImageMagick is preferable.
index 51f9417..e13129b 100644 (file)
                },
                "SkinOOUIThemes": {
                        "type": "object",
-                       "description": "Map of skin names to OOjs UI themes to use. Same format as ResourceLoaderOOUIModule::$builtinSkinThemeMap."
+                       "description": "Map of skin names to OOUI themes to use. Same format as ResourceLoaderOOUIModule::$builtinSkinThemeMap."
                },
                "PasswordPolicy": {
                        "type": "object",
index d497884..7084b51 100644 (file)
@@ -1666,6 +1666,13 @@ $query: query options passed to Title::getInternalURL()
 'GetIP': modify the ip of the current user (called only once).
 &$ip: string holding the ip as determined so far
 
+'GetLangPreferredVariant': Called in LanguageConverter#getPreferredVariant() to
+  allow fetching the language variant code from cookies or other such
+  alternative storage.
+&$req: language variant from the URL (string) or boolean false if no variant
+  was specified in the URL; the value of this variable comes from
+  LanguageConverter#getURLVariant()
+
 'GetLinkColours': modify the CSS class of an array of page links.
 $linkcolour_ids: array of prefixed DB keys of the pages linked to,
   indexed by page_id.
index 0999ad2..bdc6702 100644 (file)
@@ -222,7 +222,7 @@ class Block {
                        'ipb_block_email',
                        'ipb_allow_usertalk',
                        'ipb_parent_block_id',
-               ] + CommentStore::newKey( 'ipb_reason' )->getFields();
+               ] + CommentStore::getStore()->getFields( 'ipb_reason' );
        }
 
        /**
@@ -235,7 +235,7 @@ class Block {
         *   - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
         */
        public static function getQueryInfo() {
-               $commentQuery = CommentStore::newKey( 'ipb_reason' )->getJoin();
+               $commentQuery = CommentStore::getStore()->getJoin( 'ipb_reason' );
                return [
                        'tables' => [ 'ipblocks' ] + $commentQuery['tables'],
                        'fields' => [
@@ -460,9 +460,9 @@ class Block {
                // I wish I didn't have to do this
                $db = wfGetDB( DB_REPLICA );
                $this->mExpiry = $db->decodeExpiry( $row->ipb_expiry );
-               $this->mReason = CommentStore::newKey( 'ipb_reason' )
+               $this->mReason = CommentStore::getStore()
                        // Legacy because $row may have come from self::selectFields()
-                       ->getCommentLegacy( $db, $row )->text;
+                       ->getCommentLegacy( $db, 'ipb_reason', $row )->text;
 
                $this->isHardblock( !$row->ipb_anon_only );
                $this->isAutoblocking( $row->ipb_enable_autoblock );
@@ -654,7 +654,7 @@ class Block {
                        'ipb_block_email'      => $this->prevents( 'sendemail' ),
                        'ipb_allow_usertalk'   => !$this->prevents( 'editownusertalk' ),
                        'ipb_parent_block_id'  => $this->mParentBlockId
-               ] + CommentStore::newKey( 'ipb_reason' )->insert( $dbw, $this->mReason );
+               ] + CommentStore::getStore()->insert( $dbw, 'ipb_reason', $this->mReason );
 
                return $a;
        }
@@ -670,7 +670,7 @@ class Block {
                        'ipb_create_account'   => $this->prevents( 'createaccount' ),
                        'ipb_deleted'          => (int)$this->mHideName, // typecast required for SQLite
                        'ipb_allow_usertalk'   => !$this->prevents( 'editownusertalk' ),
-               ] + CommentStore::newKey( 'ipb_reason' )->insert( $dbw, $this->mReason );
+               ] + CommentStore::getStore()->insert( $dbw, 'ipb_reason', $this->mReason );
        }
 
        /**
index 0d679d3..8447b2c 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\IDatabase;
 
 /**
@@ -79,40 +80,71 @@ class CommentStore {
         */
        protected static $formerTempTables = [];
 
-       /** @var string */
-       protected $key;
+       /**
+        * @since 1.30
+        * @deprecated in 1.31
+        * @var string|null
+        */
+       protected $key = null;
 
        /** @var int One of the MIGRATION_* constants */
        protected $stage;
 
-       /** @var array|null Cache for `self::getJoin()` */
-       protected $joinCache = null;
+       /** @var array[] Cache for `self::getJoin()` */
+       protected $joinCache = [];
 
        /** @var Language Language to use for comment truncation */
        protected $lang;
 
        /**
-        * @param string $key A key such as "rev_comment" identifying the comment
-        *  field being fetched.
         * @param Language $lang Language to use for comment truncation. Defaults
         *  to $wgContLang.
+        * @param int $migrationStage One of the MIGRATION_* constants
         */
-       public function __construct( $key, Language $lang = null ) {
-               global $wgCommentTableSchemaMigrationStage, $wgContLang;
-
-               $this->key = $key;
-               $this->stage = $wgCommentTableSchemaMigrationStage;
-               $this->lang = $lang ?: $wgContLang;
+       public function __construct( Language $lang, $migrationStage ) {
+               $this->stage = $migrationStage;
+               $this->lang = $lang;
        }
 
        /**
         * Static constructor for easier chaining
+        * @deprecated in 1.31 Should not be constructed with a $key, use CommentStore::getStore
         * @param string $key A key such as "rev_comment" identifying the comment
         *  field being fetched.
         * @return CommentStore
         */
        public static function newKey( $key ) {
-               return new CommentStore( $key );
+               global $wgCommentTableSchemaMigrationStage, $wgContLang;
+               // TODO uncomment once not used in extensions
+               // wfDeprecated( __METHOD__, '1.31' );
+               $store = new CommentStore( $wgContLang, $wgCommentTableSchemaMigrationStage );
+               $store->key = $key;
+               return $store;
+       }
+
+       /**
+        * @since 1.31
+        * @deprecated in 1.31 Use DI to inject a CommentStore instance into your class.
+        * @return CommentStore
+        */
+       public static function getStore() {
+               return MediaWikiServices::getInstance()->getCommentStore();
+       }
+
+       /**
+        * Compat method allowing use of self::newKey until removed.
+        * @param string|null $methodKey
+        * @throw InvalidArgumentException
+        * @return string
+        */
+       private function getKey( $methodKey = null ) {
+               $key = $this->key !== null ? $this->key : $methodKey;
+               if ( $key === null ) {
+                       // @codeCoverageIgnoreStart
+                       throw new InvalidArgumentException( '$key should not be null' );
+                       // @codeCoverageIgnoreEnd
+               }
+               return $key;
        }
 
        /**
@@ -123,23 +155,29 @@ class CommentStore {
         *
         * @note Use of this method may require a subsequent database query to
         *  actually fetch the comment. If possible, use `self::getJoin()` instead.
+        *
+        * @since 1.30
+        * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @return string[] to include in the `$vars` to `IDatabase->select()`. All
         *  fields are aliased, so `+` is safe to use.
         */
-       public function getFields() {
+       public function getFields( $key = null ) {
+               $key = $this->getKey( $key );
                $fields = [];
                if ( $this->stage === MIGRATION_OLD ) {
-                       $fields["{$this->key}_text"] = $this->key;
-                       $fields["{$this->key}_data"] = 'NULL';
-                       $fields["{$this->key}_cid"] = 'NULL';
+                       $fields["{$key}_text"] = $key;
+                       $fields["{$key}_data"] = 'NULL';
+                       $fields["{$key}_cid"] = 'NULL';
                } else {
                        if ( $this->stage < MIGRATION_NEW ) {
-                               $fields["{$this->key}_old"] = $this->key;
+                               $fields["{$key}_old"] = $key;
                        }
-                       if ( isset( self::$tempTables[$this->key] ) ) {
-                               $fields["{$this->key}_pk"] = self::$tempTables[$this->key]['joinPK'];
+                       if ( isset( self::$tempTables[$key] ) ) {
+                               $fields["{$key}_pk"] = self::$tempTables[$key]['joinPK'];
                        } else {
-                               $fields["{$this->key}_id"] = "{$this->key}_id";
+                               $fields["{$key}_id"] = "{$key}_id";
                        }
                }
                return $fields;
@@ -151,56 +189,61 @@ class CommentStore {
         * Each resulting row should be passed to `self::getComment()` to get the
         * actual comment.
         *
+        * @since 1.30
+        * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @return array With three keys:
         *   - tables: (string[]) to include in the `$table` to `IDatabase->select()`
         *   - fields: (string[]) to include in the `$vars` to `IDatabase->select()`
         *   - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
         *  All tables, fields, and joins are aliased, so `+` is safe to use.
         */
-       public function getJoin() {
-               if ( $this->joinCache === null ) {
+       public function getJoin( $key = null ) {
+               $key = $this->getKey( $key );
+               if ( !array_key_exists( $key, $this->joinCache ) ) {
                        $tables = [];
                        $fields = [];
                        $joins = [];
 
                        if ( $this->stage === MIGRATION_OLD ) {
-                               $fields["{$this->key}_text"] = $this->key;
-                               $fields["{$this->key}_data"] = 'NULL';
-                               $fields["{$this->key}_cid"] = 'NULL';
+                               $fields["{$key}_text"] = $key;
+                               $fields["{$key}_data"] = 'NULL';
+                               $fields["{$key}_cid"] = 'NULL';
                        } else {
                                $join = $this->stage === MIGRATION_NEW ? 'JOIN' : 'LEFT JOIN';
 
-                               if ( isset( self::$tempTables[$this->key] ) ) {
-                                       $t = self::$tempTables[$this->key];
-                                       $alias = "temp_$this->key";
+                               if ( isset( self::$tempTables[$key] ) ) {
+                                       $t = self::$tempTables[$key];
+                                       $alias = "temp_$key";
                                        $tables[$alias] = $t['table'];
                                        $joins[$alias] = [ $join, "{$alias}.{$t['pk']} = {$t['joinPK']}" ];
                                        $joinField = "{$alias}.{$t['field']}";
                                } else {
-                                       $joinField = "{$this->key}_id";
+                                       $joinField = "{$key}_id";
                                }
 
-                               $alias = "comment_$this->key";
+                               $alias = "comment_$key";
                                $tables[$alias] = 'comment';
                                $joins[$alias] = [ $join, "{$alias}.comment_id = {$joinField}" ];
 
                                if ( $this->stage === MIGRATION_NEW ) {
-                                       $fields["{$this->key}_text"] = "{$alias}.comment_text";
+                                       $fields["{$key}_text"] = "{$alias}.comment_text";
                                } else {
-                                       $fields["{$this->key}_text"] = "COALESCE( {$alias}.comment_text, $this->key )";
+                                       $fields["{$key}_text"] = "COALESCE( {$alias}.comment_text, $key )";
                                }
-                               $fields["{$this->key}_data"] = "{$alias}.comment_data";
-                               $fields["{$this->key}_cid"] = "{$alias}.comment_id";
+                               $fields["{$key}_data"] = "{$alias}.comment_data";
+                               $fields["{$key}_cid"] = "{$alias}.comment_id";
                        }
 
-                       $this->joinCache = [
+                       $this->joinCache[$key] = [
                                'tables' => $tables,
                                'fields' => $fields,
                                'joins' => $joins,
                        ];
                }
 
-               return $this->joinCache;
+               return $this->joinCache[$key];
        }
 
        /**
@@ -209,12 +252,13 @@ class CommentStore {
         * Shared implementation for getComment() and getCommentLegacy()
         *
         * @param IDatabase|null $db Database handle for getCommentLegacy(), or null for getComment()
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @param object|array $row
         * @param bool $fallback
         * @return CommentStoreComment
         */
-       private function getCommentInternal( IDatabase $db = null, $row, $fallback = false ) {
-               $key = $this->key;
+       private function getCommentInternal( IDatabase $db = null, $key, $row, $fallback = false ) {
                $row = (array)$row;
                if ( array_key_exists( "{$key}_text", $row ) && array_key_exists( "{$key}_data", $row ) ) {
                        $cid = isset( $row["{$key}_cid"] ) ? $row["{$key}_cid"] : null;
@@ -333,12 +377,27 @@ class CommentStore {
         * If you need to fake a comment in a row for some reason, set fields
         * `{$key}_text` (string) and `{$key}_data` (JSON string or null).
         *
+        * @since 1.30
+        * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @param object|array $row Result row.
         * @param bool $fallback If true, fall back as well as possible instead of throwing an exception.
         * @return CommentStoreComment
         */
-       public function getComment( $row, $fallback = false ) {
-               return $this->getCommentInternal( null, $row, $fallback );
+       public function getComment( $key, $row = null, $fallback = false ) {
+               // Compat for method sig change in 1.31 (introduction of $key)
+               if ( $this->key !== null ) {
+                       $fallback = $row;
+                       $row = $key;
+                       $key = $this->getKey();
+               }
+               if ( $row === null ) {
+                       // @codeCoverageIgnoreStart
+                       throw new InvalidArgumentException( '$row must not be null' );
+                       // @codeCoverageIgnoreEnd
+               }
+               return $this->getCommentInternal( null, $key, $row, $fallback );
        }
 
        /**
@@ -351,13 +410,28 @@ class CommentStore {
         * If you need to fake a comment in a row for some reason, set fields
         * `{$key}_text` (string) and `{$key}_data` (JSON string or null).
         *
+        * @since 1.30
+        * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
         * @param IDatabase $db Database handle to use for lookup
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @param object|array $row Result row.
         * @param bool $fallback If true, fall back as well as possible instead of throwing an exception.
         * @return CommentStoreComment
         */
-       public function getCommentLegacy( IDatabase $db, $row, $fallback = false ) {
-               return $this->getCommentInternal( $db, $row, $fallback );
+       public function getCommentLegacy( IDatabase $db, $key, $row = null, $fallback = false ) {
+               // Compat for method sig change in 1.31 (introduction of $key)
+               if ( $this->key !== null ) {
+                       $fallback = $row;
+                       $row = $key;
+                       $key = $this->getKey();
+               }
+               if ( $row === null ) {
+                       // @codeCoverageIgnoreStart
+                       throw new InvalidArgumentException( '$row must not be null' );
+                       // @codeCoverageIgnoreEnd
+               }
+               return $this->getCommentInternal( $db, $key, $row, $fallback );
        }
 
        /**
@@ -443,23 +517,25 @@ class CommentStore {
        /**
         * Implementation for `self::insert()` and `self::insertWithTempTable()`
         * @param IDatabase $dbw
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @param string|Message|CommentStoreComment $comment
         * @param array|null $data
         * @return array [ array $fields, callable $callback ]
         */
-       private function insertInternal( IDatabase $dbw, $comment, $data ) {
+       private function insertInternal( IDatabase $dbw, $key, $comment, $data ) {
                $fields = [];
                $callback = null;
 
                $comment = $this->createComment( $dbw, $comment, $data );
 
                if ( $this->stage <= MIGRATION_WRITE_BOTH ) {
-                       $fields[$this->key] = $this->lang->truncate( $comment->text, 255 );
+                       $fields[$key] = $this->lang->truncate( $comment->text, 255 );
                }
 
                if ( $this->stage >= MIGRATION_WRITE_BOTH ) {
-                       if ( isset( self::$tempTables[$this->key] ) ) {
-                               $t = self::$tempTables[$this->key];
+                       if ( isset( self::$tempTables[$key] ) ) {
+                               $t = self::$tempTables[$key];
                                $func = __METHOD__;
                                $commentId = $comment->id;
                                $callback = function ( $id ) use ( $dbw, $commentId, $t, $func ) {
@@ -473,7 +549,7 @@ class CommentStore {
                                        );
                                };
                        } else {
-                               $fields["{$this->key}_id"] = $comment->id;
+                               $fields["{$key}_id"] = $comment->id;
                        }
                }
 
@@ -485,17 +561,34 @@ class CommentStore {
         *
         * @note It's recommended to include both the call to this method and the
         *  row insert in the same transaction.
+        *
+        * @since 1.30
+        * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
         * @param IDatabase $dbw Database handle to insert on
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @param string|Message|CommentStoreComment $comment As for `self::createComment()`
         * @param array|null $data As for `self::createComment()`
         * @return array Fields for the insert or update
         */
-       public function insert( IDatabase $dbw, $comment, $data = null ) {
-               if ( isset( self::$tempTables[$this->key] ) ) {
-                       throw new InvalidArgumentException( "Must use insertWithTempTable() for $this->key" );
+       public function insert( IDatabase $dbw, $key, $comment = null, $data = null ) {
+               // Compat for method sig change in 1.31 (introduction of $key)
+               if ( $this->key !== null ) {
+                       $data = $comment;
+                       $comment = $key;
+                       $key = $this->key;
+               }
+               if ( $comment === null ) {
+                       // @codeCoverageIgnoreStart
+                       throw new InvalidArgumentException( '$comment can not be null' );
+                       // @codeCoverageIgnoreEnd
+               }
+
+               if ( isset( self::$tempTables[$key] ) ) {
+                       throw new InvalidArgumentException( "Must use insertWithTempTable() for $key" );
                }
 
-               list( $fields ) = $this->insertInternal( $dbw, $comment, $data );
+               list( $fields ) = $this->insertInternal( $dbw, $key, $comment, $data );
                return $fields;
        }
 
@@ -507,7 +600,12 @@ class CommentStore {
         *
         * @note It's recommended to include both the call to this method and the
         *  row insert in the same transaction.
+        *
+        * @since 1.30
+        * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
         * @param IDatabase $dbw Database handle to insert on
+        * @param string $key A key such as "rev_comment" identifying the comment
+        *  field being fetched.
         * @param string|Message|CommentStoreComment $comment As for `self::createComment()`
         * @param array|null $data As for `self::createComment()`
         * @return array Two values:
@@ -515,14 +613,26 @@ class CommentStore {
         *  - callable Function to call when the primary key of the row being
         *    inserted/updated is known. Pass it that primary key.
         */
-       public function insertWithTempTable( IDatabase $dbw, $comment, $data = null ) {
-               if ( isset( self::$formerTempTables[$this->key] ) ) {
-                       wfDeprecated( __METHOD__ . " for $this->key", self::$formerTempTables[$this->key] );
-               } elseif ( !isset( self::$tempTables[$this->key] ) ) {
-                       throw new InvalidArgumentException( "Must use insert() for $this->key" );
+       public function insertWithTempTable( IDatabase $dbw, $key, $comment = null, $data = null ) {
+               // Compat for method sig change in 1.31 (introduction of $key)
+               if ( $this->key !== null ) {
+                       $data = $comment;
+                       $comment = $key;
+                       $key = $this->getKey();
+               }
+               if ( $comment === null ) {
+                       // @codeCoverageIgnoreStart
+                       throw new InvalidArgumentException( '$comment can not be null' );
+                       // @codeCoverageIgnoreEnd
+               }
+
+               if ( isset( self::$formerTempTables[$key] ) ) {
+                       wfDeprecated( __METHOD__ . " for $key", self::$formerTempTables[$key] );
+               } elseif ( !isset( self::$tempTables[$key] ) ) {
+                       throw new InvalidArgumentException( "Must use insert() for $key" );
                }
 
-               list( $fields, $callback ) = $this->insertInternal( $dbw, $comment, $data );
+               list( $fields, $callback ) = $this->insertInternal( $dbw, $key, $comment, $data );
                if ( !$callback ) {
                        $callback = function () {
                                // Do nothing.
index 8f4c346..a6a3686 100644 (file)
@@ -1004,15 +1004,15 @@ $wgParserTestMediaHandlers = [
  */
 $wgContentHandlers = [
        // the usual case
-       CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler',
+       CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
        // dumb version, no syntax highlighting
-       CONTENT_MODEL_JAVASCRIPT => 'JavaScriptContentHandler',
+       CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
        // simple implementation, for use by extensions, etc.
-       CONTENT_MODEL_JSON => 'JsonContentHandler',
+       CONTENT_MODEL_JSON => JsonContentHandler::class,
        // dumb version, no syntax highlighting
-       CONTENT_MODEL_CSS => 'CssContentHandler',
+       CONTENT_MODEL_CSS => CssContentHandler::class,
        // plain text, for use by extensions, etc.
-       CONTENT_MODEL_TEXT => 'TextContentHandler',
+       CONTENT_MODEL_TEXT => TextContentHandler::class,
 ];
 
 /**
@@ -1817,7 +1817,7 @@ $wgDBtype = 'mysql';
  * Whether to use SSL in DB connection.
  *
  * This setting is only used if $wgLBFactoryConf['class'] is set to
- * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
+ * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  * the DBO_SSL flag must be set in the 'flags' option of the database
  * connection to achieve the same functionality.
  */
@@ -1827,7 +1827,7 @@ $wgDBssl = false;
  * Whether to use compression in DB connection.
  *
  * This setting is only used $wgLBFactoryConf['class'] is set to
- * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
+ * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  * the DBO_COMPRESS flag must be set in the 'flags' option of the database
  * connection to achieve the same functionality.
  */
@@ -1998,7 +1998,7 @@ $wgDBservers = false;
  * The LBFactoryMulti class is provided for this purpose, please see
  * includes/db/LBFactoryMulti.php for configuration information.
  */
-$wgLBFactoryConf = [ 'class' => 'LBFactorySimple' ];
+$wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
 
 /**
  * After a state-changing request is done by a client, this determines
@@ -2142,7 +2142,7 @@ $wgExternalStores = [];
  * ];
  * @endcode
  *
- * Used by LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
+ * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
  * another class.
  */
 $wgExternalServers = [];
@@ -2255,7 +2255,7 @@ $wgCacheDirectory = false;
  *   - CACHE_NONE:       Do not cache
  *   - CACHE_DB:         Store cache objects in the DB
  *   - CACHE_MEMCACHED:  MemCached, must specify servers in $wgMemCachedServers
- *   - CACHE_ACCEL:      APC, APCU, XCache or WinCache
+ *   - CACHE_ACCEL:      APC, APCU or WinCache
  *   - (other):          A string may be used which identifies a cache
  *                       configuration in $wgObjectCaches.
  *
@@ -2310,34 +2310,33 @@ $wgLanguageConverterCacheType = CACHE_ANYTHING;
  * given, giving a callable function which will generate a suitable cache object.
  */
 $wgObjectCaches = [
-       CACHE_NONE => [ 'class' => 'EmptyBagOStuff', 'reportDupes' => false ],
-       CACHE_DB => [ 'class' => 'SqlBagOStuff', 'loggroup' => 'SQLBagOStuff' ],
+       CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
+       CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
 
        CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
        CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
-       CACHE_MEMCACHED => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ],
+       CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
 
        'db-replicated' => [
-               'class'       => 'ReplicatedBagOStuff',
+               'class'       => ReplicatedBagOStuff::class,
                'readFactory' => [
-                       'class' => 'SqlBagOStuff',
+                       'class' => SqlBagOStuff::class,
                        'args'  => [ [ 'slaveOnly' => true ] ]
                ],
                'writeFactory' => [
-                       'class' => 'SqlBagOStuff',
+                       'class' => SqlBagOStuff::class,
                        'args'  => [ [ 'slaveOnly' => false ] ]
                ],
                'loggroup'  => 'SQLBagOStuff',
                'reportDupes' => false
        ],
 
-       'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ],
-       'apcu' => [ 'class' => 'APCUBagOStuff', 'reportDupes' => false ],
-       'xcache' => [ 'class' => 'XCacheBagOStuff', 'reportDupes' => false ],
-       'wincache' => [ 'class' => 'WinCacheBagOStuff', 'reportDupes' => false ],
-       'memcached-php' => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ],
-       'memcached-pecl' => [ 'class' => 'MemcachedPeclBagOStuff', 'loggroup' => 'memcached' ],
-       'hash' => [ 'class' => 'HashBagOStuff', 'reportDupes' => false ],
+       'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
+       'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
+       'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
+       'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
+       'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
+       'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
 ];
 
 /**
@@ -2374,13 +2373,13 @@ $wgMainWANCache = false;
  */
 $wgWANObjectCaches = [
        CACHE_NONE => [
-               'class'    => 'WANObjectCache',
+               'class'    => WANObjectCache::class,
                'cacheId'  => CACHE_NONE,
                'channels' => []
        ]
        /* Example of a simple single data-center cache:
        'memcached-php' => [
-               'class'    => 'WANObjectCache',
+               'class'    => WANObjectCache::class,
                'cacheId'  => 'memcached-php',
                'channels' => [ 'purge' => 'wancache-main-memcached-purge' ]
        ]
@@ -2527,7 +2526,7 @@ $wgAdaptiveMessageCache = false;
  *                  Use maintenance/rebuildLocalisationCache.php instead.
  */
 $wgLocalisationCacheConf = [
-       'class' => 'LocalisationCache',
+       'class' => LocalisationCache::class,
        'store' => 'detect',
        'storeClass' => false,
        'storeDirectory' => false,
@@ -3783,10 +3782,11 @@ $wgResourceLoaderValidateStaticJS = false;
  */
 $wgResourceLoaderLESSVars = [
        /**
-        * Minimum available screen width at which a device can be considered a tablet/desktop
+        * Minimum available screen width at which a device can be considered a tablet
         * The number is currently based on the device width of a Samsung Galaxy S5 mini and is low
         * enough to cover iPad (768px). Number is prone to change with new information.
         * @since 1.27
+        * @deprecated 1.31 Use mediawiki.ui/variables instead
         */
        'deviceWidthTablet' => '720px',
 ];
@@ -3936,9 +3936,6 @@ $wgNamespaceAliases = [];
  * because articles can be created such that they are hard to view or edit.
  *
  * In some rare cases you may wish to remove + for compatibility with old links.
- *
- * Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed, but
- * this breaks interlanguage links
  */
 $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+";
 
@@ -4169,8 +4166,8 @@ $wgInvalidRedirectTargets = [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect' ];
  * an extension setup function.
  */
 $wgParserConf = [
-       'class' => 'Parser',
-       # 'preprocessorClass' => 'Preprocessor_Hash',
+       'class' => Parser::class,
+       # 'preprocessorClass' => Preprocessor_Hash::class,
 ];
 
 /**
@@ -4474,7 +4471,7 @@ $wgActiveUserDays = 30;
  * @since 1.27
  */
 $wgCentralIdLookupProviders = [
-       'local' => [ 'class' => 'LocalIdLookup' ],
+       'local' => [ 'class' => LocalIdLookup::class ],
 ];
 
 /**
@@ -4762,7 +4759,7 @@ $wgPasswordDefault = 'pbkdf2';
  * An advanced example:
  * @code
  * $wgPasswordConfig['bcrypt-peppered'] = [
- *     'class' => 'EncryptedPassword',
+ *     'class' => EncryptedPassword::class,
  *     'underlying' => 'bcrypt',
  *     'secrets' => [],
  *     'cipher' => MCRYPT_RIJNDAEL_256,
@@ -4775,31 +4772,31 @@ $wgPasswordDefault = 'pbkdf2';
  */
 $wgPasswordConfig = [
        'A' => [
-               'class' => 'MWOldPassword',
+               'class' => MWOldPassword::class,
        ],
        'B' => [
-               'class' => 'MWSaltedPassword',
+               'class' => MWSaltedPassword::class,
        ],
        'pbkdf2-legacyA' => [
-               'class' => 'LayeredParameterizedPassword',
+               'class' => LayeredParameterizedPassword::class,
                'types' => [
                        'A',
                        'pbkdf2',
                ],
        ],
        'pbkdf2-legacyB' => [
-               'class' => 'LayeredParameterizedPassword',
+               'class' => LayeredParameterizedPassword::class,
                'types' => [
                        'B',
                        'pbkdf2',
                ],
        ],
        'bcrypt' => [
-               'class' => 'BcryptPassword',
+               'class' => BcryptPassword::class,
                'cost' => 9,
        ],
        'pbkdf2' => [
-               'class' => 'Pbkdf2Password',
+               'class' => Pbkdf2Password::class,
                'algo' => 'sha512',
                'cost' => '30000',
                'length' => '64',
@@ -6109,7 +6106,7 @@ $wgDebugComments = false;
  * Write SQL queries to the debug log.
  *
  * This setting is only used $wgLBFactoryConf['class'] is set to
- * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
+ * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  * the DBO_DEBUG flag must be set in the 'flags' option of the database
  * connection to achieve the same functionality.
  */
@@ -6214,7 +6211,7 @@ $wgDebugLogGroups = [];
  *
  * @par To completely disable logging:
  * @code
- * $wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\NullSpi' ];
+ * $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ];
  * @endcode
  *
  * @since 1.25
@@ -6222,7 +6219,7 @@ $wgDebugLogGroups = [];
  * @see MwLogger
  */
 $wgMWLoggerDefaultSpi = [
-       'class' => '\\MediaWiki\\Logger\\LegacySpi',
+       'class' => \MediaWiki\Logger\LegacySpi::class,
 ];
 
 /**
@@ -6278,6 +6275,12 @@ $wgShowDBErrorBacktrace = false;
  */
 $wgLogExceptionBacktrace = true;
 
+/**
+ * If true, the MediaWiki error handler passes errors/warnings to the default error handler
+ * after logging them. The setting is ignored when the track_errors php.ini flag is true.
+ */
+$wgPropagateErrors = true;
+
 /**
  * Expose backend server host names through the API and various HTML comments
  */
@@ -6774,7 +6777,7 @@ $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
  *             'omit_bots' => true,
  *     ];
  * @example $wgRCFeeds['example'] = [
- *             'class' => 'ExampleRCFeed',
+ *             'class' => ExampleRCFeed::class,
  *     ];
  * @since 1.22
  */
@@ -6786,8 +6789,8 @@ $wgRCFeeds = [];
  * @since 1.22
  */
 $wgRCEngines = [
-       'redis' => 'RedisPubSubFeedEngine',
-       'udp' => 'UDPRCFeedEngine',
+       'redis' => RedisPubSubFeedEngine::class,
+       'udp' => UDPRCFeedEngine::class,
 ];
 
 /**
@@ -6911,8 +6914,8 @@ $wgOverrideSiteFeed = [];
  * $wgOut->isSyndicated() is true.
  */
 $wgFeedClasses = [
-       'rss' => 'RSSFeed',
-       'atom' => 'AtomFeed',
+       'rss' => RSSFeed::class,
+       'atom' => AtomFeed::class,
 ];
 
 /**
@@ -7439,24 +7442,24 @@ $wgServiceWiringFiles = [
  * or (since 1.30) a callback to use for creating the job object.
  */
 $wgJobClasses = [
-       'refreshLinks' => 'RefreshLinksJob',
-       'deleteLinks' => 'DeleteLinksJob',
-       'htmlCacheUpdate' => 'HTMLCacheUpdateJob',
-       'sendMail' => 'EmaillingJob',
-       'enotifNotify' => 'EnotifNotifyJob',
-       'fixDoubleRedirect' => 'DoubleRedirectJob',
-       'AssembleUploadChunks' => 'AssembleUploadChunksJob',
-       'PublishStashedFile' => 'PublishStashedFileJob',
-       'ThumbnailRender' => 'ThumbnailRenderJob',
-       'recentChangesUpdate' => 'RecentChangesUpdateJob',
-       'refreshLinksPrioritized' => 'RefreshLinksJob',
-       'refreshLinksDynamic' => 'RefreshLinksJob',
-       'activityUpdateJob' => 'ActivityUpdateJob',
-       'categoryMembershipChange' => 'CategoryMembershipChangeJob',
-       'clearUserWatchlist' => 'ClearUserWatchlistJob',
-       'cdnPurge' => 'CdnPurgeJob',
-       'enqueue' => 'EnqueueJob', // local queue for multi-DC setups
-       'null' => 'NullJob'
+       'refreshLinks' => RefreshLinksJob::class,
+       'deleteLinks' => DeleteLinksJob::class,
+       'htmlCacheUpdate' => HTMLCacheUpdateJob::class,
+       'sendMail' => EmaillingJob::class,
+       'enotifNotify' => EnotifNotifyJob::class,
+       'fixDoubleRedirect' => DoubleRedirectJob::class,
+       'AssembleUploadChunks' => AssembleUploadChunksJob::class,
+       'PublishStashedFile' => PublishStashedFileJob::class,
+       'ThumbnailRender' => ThumbnailRenderJob::class,
+       'recentChangesUpdate' => RecentChangesUpdateJob::class,
+       'refreshLinksPrioritized' => RefreshLinksJob::class,
+       'refreshLinksDynamic' => RefreshLinksJob::class,
+       'activityUpdateJob' => ActivityUpdateJob::class,
+       'categoryMembershipChange' => CategoryMembershipChangeJob::class,
+       'clearUserWatchlist' => ClearUserWatchlistJob::class,
+       'cdnPurge' => CdnPurgeJob::class,
+       'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
+       'null' => NullJob::class,
 ];
 
 /**
@@ -7505,7 +7508,7 @@ $wgJobSerialCommitThreshold = false;
  * These settings should be global to all wikis.
  */
 $wgJobTypeConf = [
-       'default' => [ 'class' => 'JobQueueDB', 'order' => 'random', 'claimTTL' => 3600 ],
+       'default' => [ 'class' => JobQueueDB::class, 'order' => 'random', 'claimTTL' => 3600 ],
 ];
 
 /**
@@ -7513,7 +7516,7 @@ $wgJobTypeConf = [
  * These settings should be global to all wikis.
  */
 $wgJobQueueAggregator = [
-       'class' => 'JobQueueAggregatorNull'
+       'class' => JobQueueAggregatorNull::class
 ];
 
 /**
@@ -7534,7 +7537,7 @@ $wgJobQueueIncludeInMaxLagFactor = false;
  * Expensive Querypages are already updated.
  */
 $wgSpecialPageCacheUpdates = [
-       'Statistics' => [ 'SiteStatsUpdate', 'cacheUpdate' ]
+       'Statistics' => [ SiteStatsUpdate::class, 'cacheUpdate' ]
 ];
 
 /**
@@ -7724,42 +7727,42 @@ $wgLogActions = [];
  * @see LogFormatter
  */
 $wgLogActionsHandlers = [
-       'block/block' => 'BlockLogFormatter',
-       'block/reblock' => 'BlockLogFormatter',
-       'block/unblock' => 'BlockLogFormatter',
-       'contentmodel/change' => 'ContentModelLogFormatter',
-       'contentmodel/new' => 'ContentModelLogFormatter',
-       'delete/delete' => 'DeleteLogFormatter',
-       'delete/delete_redir' => 'DeleteLogFormatter',
-       'delete/event' => 'DeleteLogFormatter',
-       'delete/restore' => 'DeleteLogFormatter',
-       'delete/revision' => 'DeleteLogFormatter',
-       'import/interwiki' => 'ImportLogFormatter',
-       'import/upload' => 'ImportLogFormatter',
-       'managetags/activate' => 'LogFormatter',
-       'managetags/create' => 'LogFormatter',
-       'managetags/deactivate' => 'LogFormatter',
-       'managetags/delete' => 'LogFormatter',
-       'merge/merge' => 'MergeLogFormatter',
-       'move/move' => 'MoveLogFormatter',
-       'move/move_redir' => 'MoveLogFormatter',
-       'patrol/patrol' => 'PatrolLogFormatter',
-       'patrol/autopatrol' => 'PatrolLogFormatter',
-       'protect/modify' => 'ProtectLogFormatter',
-       'protect/move_prot' => 'ProtectLogFormatter',
-       'protect/protect' => 'ProtectLogFormatter',
-       'protect/unprotect' => 'ProtectLogFormatter',
-       'rights/autopromote' => 'RightsLogFormatter',
-       'rights/rights' => 'RightsLogFormatter',
-       'suppress/block' => 'BlockLogFormatter',
-       'suppress/delete' => 'DeleteLogFormatter',
-       'suppress/event' => 'DeleteLogFormatter',
-       'suppress/reblock' => 'BlockLogFormatter',
-       'suppress/revision' => 'DeleteLogFormatter',
-       'tag/update' => 'TagLogFormatter',
-       'upload/overwrite' => 'UploadLogFormatter',
-       'upload/revert' => 'UploadLogFormatter',
-       'upload/upload' => 'UploadLogFormatter',
+       'block/block' => BlockLogFormatter::class,
+       'block/reblock' => BlockLogFormatter::class,
+       'block/unblock' => BlockLogFormatter::class,
+       'contentmodel/change' => ContentModelLogFormatter::class,
+       'contentmodel/new' => ContentModelLogFormatter::class,
+       'delete/delete' => DeleteLogFormatter::class,
+       'delete/delete_redir' => DeleteLogFormatter::class,
+       'delete/event' => DeleteLogFormatter::class,
+       'delete/restore' => DeleteLogFormatter::class,
+       'delete/revision' => DeleteLogFormatter::class,
+       'import/interwiki' => ImportLogFormatter::class,
+       'import/upload' => ImportLogFormatter::class,
+       'managetags/activate' => LogFormatter::class,
+       'managetags/create' => LogFormatter::class,
+       'managetags/deactivate' => LogFormatter::class,
+       'managetags/delete' => LogFormatter::class,
+       'merge/merge' => MergeLogFormatter::class,
+       'move/move' => MoveLogFormatter::class,
+       'move/move_redir' => MoveLogFormatter::class,
+       'patrol/patrol' => PatrolLogFormatter::class,
+       'patrol/autopatrol' => PatrolLogFormatter::class,
+       'protect/modify' => ProtectLogFormatter::class,
+       'protect/move_prot' => ProtectLogFormatter::class,
+       'protect/protect' => ProtectLogFormatter::class,
+       'protect/unprotect' => ProtectLogFormatter::class,
+       'rights/autopromote' => RightsLogFormatter::class,
+       'rights/rights' => RightsLogFormatter::class,
+       'suppress/block' => BlockLogFormatter::class,
+       'suppress/delete' => DeleteLogFormatter::class,
+       'suppress/event' => DeleteLogFormatter::class,
+       'suppress/reblock' => BlockLogFormatter::class,
+       'suppress/revision' => DeleteLogFormatter::class,
+       'tag/update' => TagLogFormatter::class,
+       'upload/overwrite' => UploadLogFormatter::class,
+       'upload/revert' => UploadLogFormatter::class,
+       'upload/upload' => UploadLogFormatter::class,
 ];
 
 /**
@@ -7890,7 +7893,7 @@ $wgActions = [
        'credits' => true,
        'delete' => true,
        'edit' => true,
-       'editchangetags' => 'SpecialPageAction',
+       'editchangetags' => SpecialPageAction::class,
        'history' => true,
        'info' => true,
        'markpatrolled' => true,
@@ -7899,7 +7902,7 @@ $wgActions = [
        'raw' => true,
        'render' => true,
        'revert' => true,
-       'revisiondelete' => 'SpecialPageAction',
+       'revisiondelete' => SpecialPageAction::class,
        'rollback' => true,
        'submit' => true,
        'unprotect' => true,
@@ -8048,12 +8051,12 @@ $wgDebugAPI = false;
  * @code
  *  $wgAPIModules['foo'] = 'ApiFoo';
  *  $wgAPIModules['bar'] = [
- *    'class' => 'ApiBar',
+ *    'class' => ApiBar::class,
  *    'factory' => function( $main, $name ) { ... }
  *  ];
  *  $wgAPIModules['xyzzy'] = [
- *    'class' => 'ApiXyzzy',
- *    'factory' => [ 'XyzzyFactory', 'newApiModule' ]
+ *    'class' => ApiXyzzy::class,
+ *    'factory' => [ XyzzyFactory::class, 'newApiModule' ]
  *  ];
  * @endcode
  *
@@ -8476,7 +8479,7 @@ $wgRedirectOnLogin = null;
  * @par Example using local redis instance:
  * @code
  *   $wgPoolCounterConf = [ 'ArticleView' => [
- *     'class' => 'PoolCounterRedis',
+ *     'class' => PoolCounterRedis::class,
  *     'timeout' => 15, // wait timeout in seconds
  *     'workers' => 1, // maximum number of active threads in each pool
  *     'maxqueue' => 5, // maximum number of total threads in each pool
@@ -8488,7 +8491,7 @@ $wgRedirectOnLogin = null;
  * @par Example using C daemon from https://www.mediawiki.org/wiki/Extension:PoolCounter:
  * @code
  *   $wgPoolCounterConf = [ 'ArticleView' => [
- *     'class' => 'PoolCounter_Client',
+ *     'class' => PoolCounter_Client::class,
  *     'timeout' => 15, // wait timeout in seconds
  *     'workers' => 5, // maximum number of active threads in each pool
  *     'maxqueue' => 50, // maximum number of total threads in each pool
@@ -8562,7 +8565,7 @@ $wgTextModelsToParse = [
  * @since 1.20
  */
 $wgSiteTypes = [
-       'mediawiki' => 'MediaWikiSite',
+       'mediawiki' => MediaWikiSite::class,
 ];
 
 /**
@@ -8636,7 +8639,7 @@ $wgPageLanguageUseDB = false;
  * Auto-mounting example for Parsoid:
  *
  * $wgVirtualRestConfig['paths']['/parsoid/'] = [
- *     'class' => 'ParsoidVirtualRESTService',
+ *     'class' => ParsoidVirtualRESTService::class,
  *     'options' => [
  *         'url' => 'http://localhost:8000',
  *         'prefix' => 'enwiki',
@@ -8733,7 +8736,7 @@ $wgMaxJobDBWriteDuration = false;
  */
 $wgEventRelayerConfig = [
        'default' => [
-               'class' => 'EventRelayerNull',
+               'class' => EventRelayerNull::class,
        ]
 ];
 
index ca603e7..087af39 100644 (file)
@@ -103,7 +103,7 @@ define( 'CACHE_ANYTHING', -1 );  // Use anything, as long as it works
 define( 'CACHE_NONE', 0 );       // Do not cache
 define( 'CACHE_DB', 1 );         // Store cache objects in the DB
 define( 'CACHE_MEMCACHED', 2 );  // MemCached, must specify servers in $wgMemCacheServers
-define( 'CACHE_ACCEL', 3 );      // APC, XCache or WinCache
+define( 'CACHE_ACCEL', 3 );      // APC or WinCache
 /**@}*/
 
 /**@{
index 72c3c14..6fbeed7 100644 (file)
@@ -1717,7 +1717,7 @@ class EditPage {
                                // being set. This is used by ConfirmEdit to display a captcha
                                // without any error message cruft.
                        } else {
-                               $this->hookError = $status->getWikiText();
+                               $this->hookError = $this->formatStatusErrors( $status );
                        }
                        // Use the existing $status->value if the hook set it
                        if ( !$status->value ) {
@@ -1727,7 +1727,7 @@ class EditPage {
                } elseif ( !$status->isOK() ) {
                        # ...or the hook could be expecting us to produce an error
                        // FIXME this sucks, we should just use the Status object throughout
-                       $this->hookError = $status->getWikiText();
+                       $this->hookError = $this->formatStatusErrors( $status );
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR_EXPECTED;
                        return false;
@@ -1736,6 +1736,26 @@ class EditPage {
                return true;
        }
 
+       /**
+        * Wrap status errors in an errorbox for increased visiblity
+        *
+        * @param Status $status
+        * @return string Wikitext
+        */
+       private function formatStatusErrors( Status $status ) {
+               $errmsg = $status->getWikiText(
+                       'edit-error-short',
+                       'edit-error-long',
+                       $this->context->getLanguage()
+               );
+               return <<<ERROR
+<div class="errorbox">
+{$errmsg}
+</div>
+<br clear="all" />
+ERROR;
+       }
+
        /**
         * Return the summary to be used for a new section.
         *
@@ -2452,12 +2472,22 @@ class EditPage {
                        $displayTitle = $contextTitle->getPrefixedText();
                }
                $out->setPageTitle( $this->context->msg( $msg, $displayTitle ) );
+
+               $config = $this->context->getConfig();
+
                # Transmit the name of the message to JavaScript for live preview
                # Keep Resources.php/mediawiki.action.edit.preview in sync with the possible keys
                $out->addJsConfigVars( [
                        'wgEditMessage' => $msg,
-                       'wgAjaxEditStash' => $this->context->getConfig()->get( 'AjaxEditStash' ),
+                       'wgAjaxEditStash' => $config->get( 'AjaxEditStash' ),
                ] );
+
+               // Add whether to use 'save' or 'publish' messages to JavaScript for post-edit, other
+               // editors, etc.
+               $out->addJsConfigVars(
+                       'wgEditSubmitButtonLabelPublish',
+                       $config->get( 'EditSubmitButtonLabelPublish' )
+               );
        }
 
        /**
@@ -2768,7 +2798,8 @@ class EditPage {
 
                if ( $this->wasDeletedSinceLastEdit() && 'save' == $this->formtype ) {
                        $username = $this->lastDelete->user_name;
-                       $comment = CommentStore::newKey( 'log_comment' )->getComment( $this->lastDelete )->text;
+                       $comment = CommentStore::getStore()
+                               ->getComment( 'log_comment', $this->lastDelete )->text;
 
                        // It is better to not parse the comment at all than to have templates expanded in the middle
                        // TODO: can the checkLabel be moved outside of the div so that wrapWikiMsg could be used?
@@ -3727,7 +3758,7 @@ class EditPage {
 
                return new OOUI\ButtonWidget( [
                        'id' => 'mw-editform-cancel',
-                       'href' => $this->getContextTitle()->getLinkUrl( $cancelParams ),
+                       'href' => $this->getContextTitle()->getLinkURL( $cancelParams ),
                        'label' => new OOUI\HtmlSnippet( $this->context->msg( 'cancel' )->parse() ),
                        'framed' => false,
                        'infusable' => true,
@@ -3780,7 +3811,7 @@ class EditPage {
         */
        protected function getLastDelete() {
                $dbr = wfGetDB( DB_REPLICA );
-               $commentQuery = CommentStore::newKey( 'log_comment' )->getJoin();
+               $commentQuery = CommentStore::getStore()->getJoin( 'log_comment' );
                $data = $dbr->selectRow(
                        [ 'logging', 'user' ] + $commentQuery['tables'],
                        [
index 92eec08..86e9bee 100644 (file)
@@ -88,7 +88,7 @@ class FeedItem {
         * @return string
         */
        public function getUniqueID() {
-               $id = $this->getUniqueIDUnescaped();
+               $id = $this->getUniqueIdUnescaped();
                if ( $id ) {
                        return $this->xmlEncode( $id );
                }
@@ -383,7 +383,7 @@ class RSSFeed extends ChannelFeed {
                        "title" => $item->getTitle(),
                        "url" => $this->xmlEncode( wfExpandUrl( $item->getUrlUnescaped(), PROTO_CURRENT ) ),
                        "permalink" => $item->rssIsPermalink,
-                       "uniqueID" => $item->getUniqueId(),
+                       "uniqueID" => $item->getUniqueID(),
                        "description" => $item->getDescription(),
                        "date" => $this->xmlEncode( $this->formatTime( $item->getDate() ) ),
                        "author" => $item->getAuthor()
@@ -433,7 +433,7 @@ class AtomFeed extends ChannelFeed {
                // uses htmlentities, which does not work with XML
                $templateParams = [
                        'language' => $this->xmlEncode( $this->getLanguage() ),
-                       'feedID' => $this->getFeedID(),
+                       'feedID' => $this->getFeedId(),
                        'title' => $this->getTitle(),
                        'url' => $this->xmlEncode( wfExpandUrl( $this->getUrlUnescaped(), PROTO_CURRENT ) ),
                        'selfUrl' => $this->getSelfUrl(),
@@ -474,7 +474,7 @@ class AtomFeed extends ChannelFeed {
                // Manually escaping rather than letting Mustache do it because Mustache
                // uses htmlentities, which does not work with XML
                $templateParams = [
-                       "uniqueID" => $item->getUniqueId(),
+                       "uniqueID" => $item->getUniqueID(),
                        "title" => $item->getTitle(),
                        "mimeType" => $this->xmlEncode( $wgMimeType ),
                        "url" => $this->xmlEncode( wfExpandUrl( $item->getUrlUnescaped(), PROTO_CURRENT ) ),
index 6108ca1..4dde52d 100644 (file)
@@ -89,7 +89,7 @@ class FeedUtils {
                        $timestamp,
                        $row->rc_deleted & Revision::DELETED_COMMENT
                                ? wfMessage( 'rev-deleted-comment' )->escaped()
-                               : CommentStore::newKey( 'rc_comment' )->getComment( $row )->text,
+                               : CommentStore::getStore()->getComment( 'rc_comment', $row )->text,
                        $actiontext
                );
        }
index fb75c25..6270b27 100644 (file)
@@ -306,9 +306,9 @@ class GitInfo {
                        $config = "{$this->basedir}/config";
                        $url = false;
                        if ( is_readable( $config ) ) {
-                               MediaWiki\suppressWarnings();
+                               Wikimedia\suppressWarnings();
                                $configArray = parse_ini_file( $config, true );
-                               MediaWiki\restoreWarnings();
+                               Wikimedia\restoreWarnings();
                                $remote = false;
 
                                // Use the "origin" remote repo if available or any other repo if not.
index a06d721..884c3f0 100644 (file)
@@ -877,9 +877,9 @@ function wfParseUrl( $url ) {
        if ( $wasRelative ) {
                $url = "http:$url";
        }
-       MediaWiki\suppressWarnings();
+       Wikimedia\suppressWarnings();
        $bits = parse_url( $url );
-       MediaWiki\restoreWarnings();
+       Wikimedia\restoreWarnings();
        // parse_url() returns an array without scheme for some invalid URLs, e.g.
        // parse_url("%0Ahttp://example.com") == [ 'host' => '%0Ahttp', 'path' => 'example.com' ]
        if ( !$bits || !isset( $bits['scheme'] ) ) {
@@ -2009,19 +2009,19 @@ function wfNegotiateType( $cprefs, $sprefs ) {
 /**
  * Reference-counted warning suppression
  *
- * @deprecated since 1.26, use MediaWiki\suppressWarnings() directly
+ * @deprecated since 1.26, use Wikimedia\suppressWarnings() directly
  * @param bool $end
  */
 function wfSuppressWarnings( $end = false ) {
-       MediaWiki\suppressWarnings( $end );
+       Wikimedia\suppressWarnings( $end );
 }
 
 /**
- * @deprecated since 1.26, use MediaWiki\restoreWarnings() directly
+ * @deprecated since 1.26, use Wikimedia\restoreWarnings() directly
  * Restore error level to previous value
  */
 function wfRestoreWarnings() {
-       MediaWiki\restoreWarnings();
+       Wikimedia\restoreWarnings();
 }
 
 /**
@@ -2150,9 +2150,9 @@ function wfMkdirParents( $dir, $mode = null, $caller = null ) {
        }
 
        // Turn off the normal warning, we're doing our own below
-       MediaWiki\suppressWarnings();
+       Wikimedia\suppressWarnings();
        $ok = mkdir( $dir, $mode, true ); // PHP5 <3
-       MediaWiki\restoreWarnings();
+       Wikimedia\restoreWarnings();
 
        if ( !$ok ) {
                // directory may have been created on another request since we last checked
@@ -2412,9 +2412,9 @@ function wfMerge( $old, $mine, $yours, &$result, &$mergeAttemptResult = null ) {
 
        # This check may also protect against code injection in
        # case of broken installations.
-       MediaWiki\suppressWarnings();
+       Wikimedia\suppressWarnings();
        $haveDiff3 = $wgDiff3 && file_exists( $wgDiff3 );
-       MediaWiki\restoreWarnings();
+       Wikimedia\restoreWarnings();
 
        if ( !$haveDiff3 ) {
                wfDebug( "diff3 not found\n" );
@@ -2496,9 +2496,9 @@ function wfDiff( $before, $after, $params = '-u' ) {
        }
 
        global $wgDiff;
-       MediaWiki\suppressWarnings();
+       Wikimedia\suppressWarnings();
        $haveDiff = $wgDiff && file_exists( $wgDiff );
-       MediaWiki\restoreWarnings();
+       Wikimedia\restoreWarnings();
 
        # This check may also protect against code injection in
        # case of broken installations.
@@ -2754,7 +2754,7 @@ function wfSetupSession( $sessionId = false ) {
        if ( session_id() !== $session->getId() ) {
                session_id( $session->getId() );
        }
-       MediaWiki\quietCall( 'session_start' );
+       Wikimedia\quietCall( 'session_start' );
 }
 
 /**
@@ -3122,15 +3122,15 @@ function wfMemoryLimit() {
                $conflimit = wfShorthandToInteger( $wgMemoryLimit );
                if ( $conflimit == -1 ) {
                        wfDebug( "Removing PHP's memory limit\n" );
-                       MediaWiki\suppressWarnings();
+                       Wikimedia\suppressWarnings();
                        ini_set( 'memory_limit', $conflimit );
-                       MediaWiki\restoreWarnings();
+                       Wikimedia\restoreWarnings();
                        return $conflimit;
                } elseif ( $conflimit > $memlimit ) {
                        wfDebug( "Raising PHP's memory limit to $conflimit bytes\n" );
-                       MediaWiki\suppressWarnings();
+                       Wikimedia\suppressWarnings();
                        ini_set( 'memory_limit', $conflimit );
-                       MediaWiki\restoreWarnings();
+                       Wikimedia\restoreWarnings();
                        return $conflimit;
                }
        }
@@ -3283,9 +3283,9 @@ function wfUnpack( $format, $data, $length = false ) {
                }
        }
 
-       MediaWiki\suppressWarnings();
+       Wikimedia\suppressWarnings();
        $result = unpack( $format, $data );
-       MediaWiki\restoreWarnings();
+       Wikimedia\restoreWarnings();
 
        if ( $result === false ) {
                // If it cannot extract the packed data.
index 075b48d..1d4f6e4 100644 (file)
@@ -519,9 +519,9 @@ class DiffHistoryBlob implements HistoryBlob {
        function diff( $t1, $t2 ) {
                # Need to do a null concatenation with warnings off, due to bugs in the current version of xdiff
                # "String is not zero-terminated"
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $diff = xdiff_string_rabdiff( $t1, $t2 ) . '';
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
                return $diff;
        }
 
@@ -532,9 +532,9 @@ class DiffHistoryBlob implements HistoryBlob {
         */
        function patch( $base, $diff ) {
                if ( function_exists( 'xdiff_string_bpatch' ) ) {
-                       MediaWiki\suppressWarnings();
+                       Wikimedia\suppressWarnings();
                        $text = xdiff_string_bpatch( $base, $diff ) . '';
-                       MediaWiki\restoreWarnings();
+                       Wikimedia\restoreWarnings();
                        return $text;
                }
 
@@ -707,7 +707,7 @@ if ( false ) {
        // autoload entries for the lowercase variants of these classes (T166759).
        // The code below is never executed, but it is picked up by the AutoloadGenerator
        // parser, which scans for class_alias() calls.
-       class_alias( 'ConcatenatedGzipHistoryBlob', 'concatenatedgziphistoryblob' );
-       class_alias( 'HistoryBlobCurStub', 'historyblobcurstub' );
-       class_alias( 'HistoryBlobStub', 'historyblobstub' );
+       class_alias( ConcatenatedGzipHistoryBlob::class, 'concatenatedgziphistoryblob' );
+       class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
+       class_alias( HistoryBlobStub::class, 'historyblobstub' );
 }
index dfd80a8..3bcf131 100644 (file)
@@ -589,9 +589,12 @@ class Html {
         *
         * @param string $contents CSS
         * @param string $media A media type string, like 'screen'
+        * @param array $attribs (since 1.31) Associative array of attributes, e.g., [
+        *   'href' => 'https://www.mediawiki.org/' ]. See expandAttributes() for
+        *   further documentation.
         * @return string Raw HTML
         */
-       public static function inlineStyle( $contents, $media = 'all' ) {
+       public static function inlineStyle( $contents, $media = 'all', $attribs = [] ) {
                // Don't escape '>' since that is used
                // as direct child selector.
                // Remember, in css, there is no "x" for hexadecimal escapes, and
@@ -609,7 +612,7 @@ class Html {
 
                return self::rawElement( 'style', [
                        'media' => $media,
-               ], $contents );
+               ] + $attribs, $contents );
        }
 
        /**
index 150c72f..6c932d2 100644 (file)
@@ -548,6 +548,9 @@ class MediaWiki {
                                }
                        }
 
+                       MWExceptionHandler::handleException( $e );
+               } catch ( Error $e ) {
+                       // Type errors and such: at least handle it now and clean up the LBFactory state
                        MWExceptionHandler::handleException( $e );
                }
 
@@ -1028,7 +1031,7 @@ class MediaWiki {
                        $port = $info['port'];
                }
 
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $sock = $host ? fsockopen(
                        $host,
                        $port,
@@ -1037,7 +1040,7 @@ class MediaWiki {
                        // If it takes more than 100ms to connect to ourselves there is a problem...
                        0.100
                ) : false;
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                $invokedWithSuccess = true;
                if ( $sock ) {
index 00767c7..9077666 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace MediaWiki;
 
+use CommentStore;
 use Config;
 use ConfigFactory;
 use CryptHKDF;
@@ -15,6 +16,8 @@ use MediaWiki\Preferences\PreferencesFactory;
 use MediaWiki\Shell\CommandFactory;
 use MediaWiki\Storage\BlobStore;
 use MediaWiki\Storage\BlobStoreFactory;
+use MediaWiki\Storage\RevisionFactory;
+use MediaWiki\Storage\RevisionLookup;
 use MediaWiki\Storage\RevisionStore;
 use Wikimedia\Rdbms\LBFactory;
 use LinkCache;
@@ -727,6 +730,22 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'RevisionStore' );
        }
 
+       /**
+        * @since 1.31
+        * @return RevisionLookup
+        */
+       public function getRevisionLookup() {
+               return $this->getService( 'RevisionLookup' );
+       }
+
+       /**
+        * @since 1.31
+        * @return RevisionFactory
+        */
+       public function getRevisionFactory() {
+               return $this->getService( 'RevisionFactory' );
+       }
+
        /**
         * @since 1.31
         * @return PreferencesFactory
@@ -743,6 +762,14 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'HttpRequestFactory' );
        }
 
+       /**
+        * @since 1.31
+        * @return CommentStore
+        */
+       public function getCommentStore() {
+               return $this->getService( 'CommentStore' );
+       }
+
        ///////////////////////////////////////////////////////////////////////////
        // NOTE: When adding a service getter here, don't forget to add a test
        // case for it in MediaWikiServicesTest::provideGetters() and in
index b969e03..0e9bb46 100644 (file)
@@ -1,10 +1,6 @@
 <?php
 
 /**
- *
- *
- * Created on Dec 29, 2015
- *
  * Copyright © 2015 Geoffrey Mon <geofbot@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
index e55eaaf..fac9a59 100644 (file)
@@ -1245,7 +1245,14 @@ class Message implements MessageSpecifier, Serializable {
                );
 
                return $out instanceof ParserOutput
-                       ? $out->getText( [ 'enableSectionEditLinks' => false ] )
+                       ? $out->getText( [
+                               'enableSectionEditLinks' => false,
+                               // Wrapping messages in an extra <div> is probably not expected. If
+                               // they're outside the content area they probably shouldn't be
+                               // targeted by CSS that's targeting the parser output, and if
+                               // they're inside they already are from the outer div.
+                               'unwrap' => true,
+                       ] )
                        : $out;
        }
 
index fe82465..fc9f6a6 100644 (file)
@@ -597,7 +597,12 @@ class MovePage {
 
                                $redirectArticle->doEditUpdates( $redirectRevision, $user, [ 'created' => true ] );
 
-                               ChangeTags::addTags( $changeTags, null, $redirectRevId, null );
+                               // make a copy because of log entry below
+                               $redirectTags = $changeTags;
+                               if ( in_array( 'mw-new-redirect', ChangeTags::getSoftwareTags() ) ) {
+                                       $redirectTags[] = 'mw-new-redirect';
+                               }
+                               ChangeTags::addTags( $redirectTags, null, $redirectRevId, null );
                        }
                }
 
index fc7fbf7..6b44a55 100644 (file)
@@ -52,12 +52,6 @@ class OutputPage extends ContextSource {
        /** @var bool */
        protected $mCanonicalUrl = false;
 
-       /**
-        * @var array Additional stylesheets. Looks like this is for extensions.
-        *   Might be replaced by ResourceLoader.
-        */
-       protected $mExtStyles = [];
-
        /**
         * @var string Should be private - has getter and setter. Contains
         *   the HTML title */
@@ -464,31 +458,6 @@ class OutputPage extends ContextSource {
                $this->mScripts .= $script;
        }
 
-       /**
-        * Register and add a stylesheet from an extension directory.
-        *
-        * @deprecated since 1.27 use addModuleStyles() or addStyle() instead
-        * @param string $url Path to sheet.  Provide either a full url (beginning
-        *             with 'http', etc) or a relative path from the document root
-        *             (beginning with '/').  Otherwise it behaves identically to
-        *             addStyle() and draws from the /skins folder.
-        */
-       public function addExtensionStyle( $url ) {
-               wfDeprecated( __METHOD__, '1.27' );
-               array_push( $this->mExtStyles, $url );
-       }
-
-       /**
-        * Get all styles added by extensions
-        *
-