wiki.techinc.nl/includes/api
Timo Tijhof 01f3efe4ff Hook: Mark abortable=false hooks as void
* Remove the mention of 'return true' being legal.
  This is only allowed for compat with code from before MW 1.21,
  when I added hook aborting as well as tolerance for null to
  be the same as true.

  Since then, there is no reason to return null or return true.
  For early returns, an explicitly void 'return;' should be used
  instead. Returning anything else like null/true serves no purpose
  other than to confuse the reader.

* Mark the interfaces as natively 'void' with return type hints.

  This means in core code that runs the hook, static analysis
  like Phan and in IDEs, it will be known that these onFoo()s
  never return a value, thus allowing them to detect if its
  return value is assigned or used in a conditional for any
  reason, which can be an easy mistake.

  It also means that in the future when extensions start using
  these interfaces in 'implements' statement, they will be
  required to mark their hooks as void.

  That migration is opt-in and still up ahead. This is not
  a breaking change even for all existing extensions where
  a return true/null may exist in an abortable hook since this
  only applies to code directly typed against the interface.
  The internal run() method doesn't care.

Change-Id: Ib79289bd486ac97cec492e72f9a8dee70cf2f6c2
2020-06-22 19:07:35 +00:00
..
Hook Hook: Mark abortable=false hooks as void 2020-06-22 19:07:35 +00:00
i18n Localisation updates from https://translatewiki.net. 2020-06-22 08:41:20 +02:00
Validator Add expiry type to ParamValidator 2020-04-08 16:21:04 -04:00
ApiAMCreateAccount.php API: Use MediaWikiServices::getAuthManager in various Api classes 2020-06-20 23:04:17 +00:00
ApiAuthManagerHelper.php API: Use MediaWikiServices::getAuthManager in various Api classes 2020-06-20 23:04:17 +00:00
ApiBase.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiBlock.php Remove $wgEnablePartialBlocks config and always enable partial blocks 2020-03-04 13:45:44 +00:00
ApiBlockInfoTrait.php
ApiChangeAuthenticationData.php Merge "API: Use MediaWikiServices::getAuthManager in various Api classes" 2020-06-20 23:23:07 +00:00
ApiChangeContentModel.php Add ContentModelChangeFactory, implemented by PageCommandFactory 2020-05-30 22:36:16 +00:00
ApiCheckToken.php
ApiClearHasMsg.php ApiClearHasMsg: Use new TalkPageNotificationManager 2020-05-11 19:21:57 +00:00
ApiClientLogin.php Merge "API: Use MediaWikiServices::getAuthManager in various Api classes" 2020-06-20 23:23:07 +00:00
ApiComparePages.php Added timestamp to action=compare 2020-04-09 16:24:21 -04:00
ApiContinuationManager.php Upgrade phan to 0.9.1 2020-01-25 10:53:26 +00:00
ApiCSPReport.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiDelete.php Use MediaWikiServices::getRepoGroup in api related classes 2020-04-11 23:58:00 +00:00
ApiDisabled.php
ApiEditPage.php Fix SingleSpaceBeforeSingleLineComment 2020-05-11 00:57:11 +00:00
ApiEmailUser.php
ApiErrorFormatter.php Clean up redundant Exception|Throwable union type 2020-02-12 20:28:40 +00:00
ApiErrorFormatter_BackCompat.php Clean up redundant Exception|Throwable union type 2020-02-12 20:28:40 +00:00
ApiExpandTemplates.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiFeedContributions.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiFeedRecentChanges.php
ApiFeedWatchlist.php
ApiFileRevert.php Use MediaWikiServices::getRepoGroup in api related classes 2020-04-11 23:58:00 +00:00
ApiFormatBase.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiFormatFeedWrapper.php
ApiFormatJson.php
ApiFormatNone.php
ApiFormatPhp.php
ApiFormatRaw.php
ApiFormatXml.php
ApiFormatXmlRsd.php
ApiHelp.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiHelpParamValueMessage.php
ApiHookRunner.php Hook: Mark abortable=false hooks as void 2020-06-22 19:07:35 +00:00
ApiImageRotate.php Fix some PHPStorm inspection warnings in includes/api 2020-02-18 14:17:37 -05:00
ApiImport.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiImportReporter.php
ApiLinkAccount.php API: Use MediaWikiServices::getAuthManager in various Api classes 2020-06-20 23:04:17 +00:00
ApiLogin.php Merge "API: Use MediaWikiServices::getAuthManager in various Api classes" 2020-06-20 23:23:07 +00:00
ApiLogout.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiMain.php Reduce further direct references to $wgUser 2020-06-05 11:06:21 +00:00
ApiManageTags.php Fix some PHPStorm inspection warnings in includes/api 2020-02-18 14:17:37 -05:00
ApiMergeHistory.php Add MergeHistoryFactory interface, implemented by PageCommandFactory 2020-05-13 19:08:09 +00:00
ApiMessage.php
ApiMessageTrait.php
ApiModuleManager.php
ApiMove.php Fix some PHPStorm inspection warnings in includes/api 2020-02-18 14:17:37 -05:00
ApiOpenSearch.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiOpenSearchFormatJson.php
ApiOptions.php Remove PreferencesFactory::setUser() 2020-06-08 00:27:04 +00:00
ApiPageSet.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiParamInfo.php Allow extensions (et al) to have multiple LICENSE/COPYING files 2020-05-05 22:49:04 +00:00
ApiParse.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiPatrol.php
ApiProtect.php
ApiPurge.php
ApiQuery.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryAllCategories.php
ApiQueryAllDeletedRevisions.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiQueryAllImages.php Use MediaWikiServices::getRepoGroup in api related classes 2020-04-11 23:58:00 +00:00
ApiQueryAllLinks.php
ApiQueryAllMessages.php Use MediaWikiServices::getMessageCache 2020-03-14 14:25:03 +01:00
ApiQueryAllPages.php
ApiQueryAllRevisions.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiQueryAllUsers.php
ApiQueryAuthManagerInfo.php API: Use MediaWikiServices::getAuthManager in various Api classes 2020-06-20 23:04:17 +00:00
ApiQueryBacklinks.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiQueryBacklinksprop.php
ApiQueryBase.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryBlockInfoTrait.php Fix some PHPStorm inspection warnings in includes/api 2020-02-18 14:17:37 -05:00
ApiQueryBlocks.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiQueryCategories.php
ApiQueryCategoryInfo.php
ApiQueryCategoryMembers.php
ApiQueryContributors.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiQueryDeletedRevisions.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiQueryDeletedrevs.php Hard deprecate Revision::userCanBitfield 2020-02-24 21:18:49 +00:00
ApiQueryDisabled.php
ApiQueryDuplicateFiles.php Use MediaWikiServices::getRepoGroup in api related classes 2020-04-11 23:58:00 +00:00
ApiQueryExternalLinks.php
ApiQueryExtLinksUsage.php ApiQueryExtLinksUsage: Avoid bad query plan 2020-02-04 16:05:11 -05:00
ApiQueryFilearchive.php
ApiQueryFileRepoInfo.php Use MediaWikiServices::getRepoGroup in api related classes 2020-04-11 23:58:00 +00:00
ApiQueryGeneratorBase.php Remove null check on type hinted argument 2020-06-19 19:18:28 +02:00
ApiQueryImageInfo.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiQueryImages.php
ApiQueryInfo.php Reduce direct uses of $wgUser in ApiQueryInfo's token methods 2020-06-08 02:12:51 +00:00
ApiQueryIWBacklinks.php
ApiQueryIWLinks.php
ApiQueryLangBacklinks.php
ApiQueryLangLinks.php Remove usages of deprecated Language methods 2020-02-16 00:45:48 +00:00
ApiQueryLanguageinfo.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiQueryLinks.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiQueryLogEvents.php Fix some PHPStorm inspection warnings in includes/api 2020-02-18 14:17:37 -05:00
ApiQueryMyStashedFiles.php
ApiQueryPagePropNames.php
ApiQueryPageProps.php
ApiQueryPagesWithProp.php
ApiQueryPrefixSearch.php
ApiQueryProtectedTitles.php
ApiQueryQueryPage.php Fix the namespace of SpecialPageFactory 2020-02-21 13:46:19 +11:00
ApiQueryRandom.php
ApiQueryRecentChanges.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryRevisions.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryRevisionsBase.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiQuerySearch.php
ApiQuerySiteinfo.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryStashImageInfo.php Use MediaWikiServices::getRepoGroup in api related classes 2020-04-11 23:58:00 +00:00
ApiQueryTags.php
ApiQueryTokens.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryUserContribs.php Hard deprecate Revision::getParentLengths 2020-03-18 12:26:26 -07:00
ApiQueryUserInfo.php Merge "Use new TalkPageNotificationManager" 2020-05-20 19:21:52 +00:00
ApiQueryUsers.php Merge "API: Use MediaWikiServices::getAuthManager in various Api classes" 2020-06-20 23:23:07 +00:00
ApiQueryWatchlist.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiQueryWatchlistRaw.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiRawMessage.php
ApiRemoveAuthenticationData.php Merge "API: Use MediaWikiServices::getAuthManager in various Api classes" 2020-06-20 23:23:07 +00:00
ApiResetPassword.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiResult.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiRevisionDelete.php Fix some PHPStorm inspection warnings in includes/api 2020-02-18 14:17:37 -05:00
ApiRollback.php ApiRollback: Reduce use of Revision objects 2020-06-10 00:24:21 +00:00
ApiRsd.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiSerializable.php
ApiSetNotificationTimestamp.php
ApiSetPageLanguage.php Remove usages of deprecated Language methods 2020-02-16 00:45:48 +00:00
ApiStashEdit.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:14 +01:00
ApiTag.php
ApiTokens.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiUnblock.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiUndelete.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
ApiUpload.php Remove terminating line breaks from debug messages 2020-06-03 12:01:16 +10:00
ApiUsageException.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiUserrights.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiValidatePassword.php Merge "API: Use MediaWikiServices::getAuthManager in various Api classes" 2020-06-20 23:23:07 +00:00
ApiWatch.php WatchedItemStore: Enforce a maximum watchlist expiry duration 2020-05-22 00:15:23 -04:00
IApiMessage.php Hard deprecate Title::getUserPermissionsErrors 2020-02-26 05:09:55 +00:00
SearchApi.php