Manual:findDeprecated.php
From Linux Web Expert
MediaWiki file: findDeprecated.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Classes: | FileAwareNodeVisitor • DeprecatedInterfaceFinder • FindDeprecated |
Details
findDeprecated.php maintenance script recursively scans MediaWiki PHP files for deprecated functions and interfaces and produces a report. This is a useful feature when you do development and want to know whether you are using any deprecated functions or interfaces.
Options/Arguments
This script does not take any options or arguments.
Usage
php maintenance/findDeprecated.php
Getting all deprecated functions and interfaces
Terminal
$ php maintenance/findDeprecated.php [########################################################################] 100% * Deprecated since 1.24: - ApiQueryInfo::getBlockToken (includes/api/ApiQueryInfo.php:258) - ApiQueryInfo::getDeleteToken (includes/api/ApiQueryInfo.php:231) - ApiQueryInfo::getEditToken (includes/api/ApiQueryInfo.php:222) - ApiQueryInfo::getEmailToken (includes/api/ApiQueryInfo.php:277) - ApiQueryInfo::getImportToken (includes/api/ApiQueryInfo.php:295) - ApiQueryInfo::getMoveToken (includes/api/ApiQueryInfo.php:249) - .... * Deprecated since 1.25: - Status::getErrorsArray (includes/Status.php:355) - Status::getWarningsArray (includes/Status.php:366) * Deprecated since 1.26: - MWTimestamp::getHumanTimestamp (includes/MWTimestamp.php:67) - MediaTransformOutput::streamFile (includes/media/MediaTransformOutput.php:229) - User::getTokenFromOption (includes/user/User.php:2642) * Deprecated since 1.27: - ConfigFactory::getDefaultInstance (includes/config/ConfigFactory.php:51) - ContextSource::getStats (includes/context/ContextSource.php:182) - DerivativeContext::getStats (includes/context/DerivativeContext.php:110) - IContextSource::getStats (includes/context/IContextSource.php:132) - RequestContext::getStats (includes/context/RequestContext.php:154) * Deprecated since 1.28: - Linker::link (includes/Linker.php:87) - Linker::linkKnown (includes/Linker.php:143) - DataUpdate::runUpdates (includes/deferred/DataUpdate.php:83) * Deprecated since 1.29: - RecentChange::getEngine (includes/changes/RecentChange.php:593) * Deprecated since 1.30: - wfEscapeShellArg (includes/GlobalFunctions.php:1907) - wfShellExec (includes/GlobalFunctions.php:1935) - wfShellExecWithStderr (includes/GlobalFunctions.php:1988) - IDatabase::nextSequenceValue (includes/libs/rdbms/database/IDatabase.php:1365) - Article::viewRedirect (includes/page/Article.php:1679) - ... * Deprecated since 1.31: - CommentStore::getStore (includes/CommentStore.php:120) - wfShellWikiCmd (includes/GlobalFunctions.php:2008) - RevisionStore::userWasLastToEdit (includes/Revision/RevisionStore.php:2830) - SqlBlobStore::getTextIdFromAddress (includes/Storage/SqlBlobStore.php:662) - DifferenceEngine::getDiffBodyCacheKey (includes/diff/DifferenceEngine.php:1293) - ... * Deprecated since 1.32: - wfGetCache (includes/GlobalFunctions.php:2476) - wfGetMainCache (includes/GlobalFunctions.php:2486) - DifferenceEngine::generateContentDiffBody (includes/diff/DifferenceEngine.php:1394) - DifferenceEngine::generateTextDiffBody (includes/diff/DifferenceEngine.php:1422) - DifferenceEngine::setContent (includes/diff/DifferenceEngine.php:1855) - ... * Deprecated since 1.33: - Content::getNativeData (includes/content/Content.php:90) - ContentHandler::getDefaultModelFor (includes/content/ContentHandler.php:198) - MessageContent::getNativeData (includes/content/MessageContent.php:87) - TextContent::getNativeData (includes/content/TextContent.php:139) - PreparedEdit::__get (includes/edit/PreparedEdit.php:117) - ... * Deprecated since 1.34: - wfFindFile (includes/GlobalFunctions.php:2267) - MWNamespace::exists (includes/MWNamespace.php:118) - MWNamespace::getCanonicalIndex (includes/MWNamespace.php:195) - MWNamespace::getCanonicalName (includes/MWNamespace.php:182) - MWNamespace::getCanonicalNamespaces (includes/MWNamespace.php:170) - ... * Deprecated since 1.35: - wfGetScriptUrl (includes/GlobalFunctions.php:2324) - wfWikiID (includes/GlobalFunctions.php:2184) - Hooks::clear (includes/Hooks.php:70) - Hooks::getHandlers (includes/Hooks.php:102) - Hooks::isRegistered (includes/Hooks.php:88) - Hooks::register (includes/Hooks.php:48) - ... * Deprecated since 1.36: - wfClearOutputBuffers (includes/GlobalFunctions.php:1651) - MagicWordArray::getVariableRegex (includes/MagicWordArray.php:176) - MediaWikiServices::getWatchlistNotificationManager (includes/MediaWikiServices.php:1736) - MovePage::checkPermissions (includes/MovePage.php:299) - OutputPage::formatPermissionsErrorMessage (includes/OutputPage.php:2843) - ... * Deprecated since 1.37: - wfCanIPUseHTTPS (includes/GlobalFunctions.php:2535) - wfGetLB (includes/GlobalFunctions.php:2248) - wfIncrStats (includes/GlobalFunctions.php:1088) - wfLocalFile (includes/GlobalFunctions.php:2280) - MWNamespace::equals (includes/MWNamespace.php:137) - ... legend: -: soft-deprecated +: hard-deprecated (via wfDeprecated())