Page MenuHomePhabricator

Remove UnitTestsList hook subscribers, move tests to be autodiscovered for extensions that have been converted to extension registration
Open, LowPublic

Description

Now https://gerrit.wikimedia.org/r/#/c/302944/ is merged, phpunit tests can be autodiscovered by moving them into the correct place. See https://gerrit.wikimedia.org/r/#/c/302958/ for example

Once this has been done, UnitTestsList subscribers can be removed

Ready to go list:

  • AbuseFilter
  • ActiveAbstract
  • AntiSpoof
  • ArticlePlaceholder
  • Babel
  • BaseHooks
  • BetaFeatures
  • BounceHandler
  • Capiunto
  • CentralAuth
  • Cognate
  • CollaborationKit
  • CommonsMetadata
  • ConfirmEdit
  • DonationInterface
  • Elastica
  • EventBus
  • ExtensionDistributor
  • Gadgets
  • GlobalCssJs
  • GoogleAPIClient
  • GuidedTour
  • Kartographer
  • LocalisationUpdate
  • LoginNotify
  • MaintenanceShell
  • MassMessage
  • Math
  • MathSearch
  • MobileFrontend
  • MolHandler
  • Newsletter
  • OAuthAuthentication
  • ORES
  • PageAssessments
  • PageForms
  • ParserFunctions
  • PhpTags
  • PhpTagsFunctions
  • PhpTagsWidgets
  • PhpTagsWiki
  • ProofreadPage
  • QuickSearchLookup
  • SendGrid
  • Sentry
  • TemplateData
  • TemplateStyles
  • TextExtracts
  • Thanks
  • TitleBlacklist
  • TwnMainPage
  • UploadWizard
  • UrlShortener
  • UserMerge
  • WikibaseMediaInfo
  • WikibaseQuality
  • Wikidata
  • WikidataPageBanner
  • WikimediaEvents
  • WikimediaIncubator

Details

Related Gerrit Patches:
mediawiki/extensions/DonationInterface : masterRemove 'UnitTestList' hook
mediawiki/extensions/PageForms : masterRemove 'UnitTestList' hook
mediawiki/extensions/BounceHandler : masterMove tests to tests/phpunit/ and remove hook
mediawiki/extensions/PagedTiffHandler : masterRemove 'UnitTestList' hook
mediawiki/extensions/Math : masterMove phpunit test files
mediawiki/extensions/MathSearch : masterRemove 'UnitTestList' hook
mediawiki/extensions/PhpTagsSMW : masterRemove 'UnitTestList' hook
mediawiki/extensions/PhpTagsWidgets : masterRemove 'UnitTestList' hook
mediawiki/extensions/PhpTagsFunctions : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceFoundation : masterRemove 'UnitTestList' hook
mediawiki/extensions/PhpTags : masterRemove 'UnitTestList' hook
mediawiki/extensions/PhpTagsWiki : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpicePageTemplates : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceReaders : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceInterWikiLinks : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceUserManager : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpicePageAssignments : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceSmartList : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceNamespaceManager : masterRemove 'UnitTestList' hook
mediawiki/extensions/MolHandler : masterRemove 'UnitTestList' hook
mediawiki/extensions/NSFileRepo : masterRemove 'UnitTestList' hook
mediawiki/extensions/OAuthAuthentication : masterRemove 'UnitTestList' hook
mediawiki/extensions/NewUserActions : masterRemove 'UnitTestList' hook
mediawiki/extensions/MultiLanguageManager : masterRemove 'UnitTestList' hook
mediawiki/extensions/BaseHooks : masterMove tests to tests/phpunit/ and remove hook
mediawiki/extensions/BlueSpiceAvatars : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceRSSFeeder : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceInsertMagic : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceInsertFile : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceChecklist : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceGroupManager : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceExtendedStatistics : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceExtendedSearch : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceContextMenu : masterRemove 'UnitTestList' hook
mediawiki/extensions/BlueSpiceDashboards : masterRemove 'UnitTestList' hook
mediawiki/extensions/SendGrid : masterRemove 'UnitTestList' hook
mediawiki/extensions/QuickSearchLookup : masterRemove 'UnitTestList' hook
mediawiki/extensions/Newsletter : masterRemove 'UnitTestList' hook
mediawiki/extensions/MaintenanceShell : masterRemove 'UnitTestList' hook
mediawiki/extensions/CentralNotice : masterRemove 'UnitTestList' hook
mediawiki/extensions/Scribunto : masterMove tests into tests/phpunit and remove UnitTestsList hook
mediawiki/extensions/CirrusSearch : masterRemove UnitTestList hook subscriber
mediawiki/extensions/UserMerge : masterRemove 'UnitTestList' hook
mediawiki/extensions/VipsScaler : masterRemove 'UnitTestList' hook
mediawiki/extensions/TextExtracts : masterRemove 'UnitTestList' hook
mediawiki/extensions/MassMessage : masterRemove 'UnitTestList' hook
mediawiki/extensions/JsonConfig : masterAdd extension.json, empty PHP entry point
mediawiki/extensions/LoginNotify : masterMove tests to tests/phpunit/ and remove hook
mediawiki/extensions/ArticlePlaceholder : masterRemove "UnitTestsList" hook
mediawiki/extensions/Gadgets : masterRemove 'UnitTestList' hook
mediawiki/extensions/TemplateStyles : masterRemove 'UnitTestList' hook
mediawiki/extensions/CollaborationKit : masterRemove 'UnitTestList' hook
mediawiki/extensions/WikibaseMediaInfo : masterRemove 'UnitTestList' hook
mediawiki/extensions/ParserFunctions : masterRemove 'UnitTestList' hook
mediawiki/extensions/WikibaseQuality : masterRemove 'UnitTestList' hook
mediawiki/extensions/TwnMainPage : masterRemove 'UnitTestList' hook
mediawiki/extensions/Sentry : masterRemove 'UnitTestList' hook
mediawiki/extensions/ProofreadPage : masterRemove 'UnitTestList' hook
mediawiki/extensions/Math : masterRemove 'UnitTestList' hook
mediawiki/extensions/GlobalCssJs : masterRemove 'UnitTestList' hook
mediawiki/extensions/Babel : masterRemove 'UnitTestList' hook
mediawiki/extensions/GuidedTour : masterRemove 'UnitTestList' hook
mediawiki/extensions/Capiunto : masterRemove 'UnitTestList' hook
mediawiki/extensions/Elastica : masterRemove 'UnitTestList' hook
mediawiki/extensions/CommonsMetadata : masterRemove 'UnitTestList' hook
mediawiki/extensions/EventBus : masterRemove 'UnitTestList' hook
mediawiki/extensions/ExtensionDistributor : masterRemove 'UnitTestList' hook
mediawiki/extensions/Kartographer : masterRemove 'UnitTestList' hook
mediawiki/extensions/ConfirmEdit : masterRemove 'UnitTestList' hook
mediawiki/extensions/WikimediaIncubator : masterRemove 'UnitTestList' hook
mediawiki/extensions/WikimediaEvents : masterRemove 'UnitTestList' hook
mediawiki/extensions/TitleBlacklist : masterRemove 'UnitTestList' hook
mediawiki/extensions/WikidataPageBanner : masterRemove 'UnitTestList' hook
mediawiki/extensions/Thanks : masterRemove 'UnitTestList' hook
mediawiki/extensions/PageAssessments : masterRemove 'UnitTestList' hook
mediawiki/extensions/ORES : masterRemove 'UnitTestList' hook
mediawiki/extensions/TemplateData : masterRemove 'UnitTestList' hook
mediawiki/extensions/LocalisationUpdate : masterRemove 'UnitTestList' hook
mediawiki/extensions/RelatedArticles : masterRemove 'UnitTestList' hook
mediawiki/extensions/MobileFrontend : masterRemove 'UnitTestList' hook
mediawiki/extensions/UploadWizard : masterRemove 'UnitTestList' hook
mediawiki/extensions/UrlShortener : masterRemove 'UnitTestList' hook
mediawiki/extensions/BetaFeatures : masterMove tests to tests/phpunit/ and remove hook
mediawiki/extensions/ActiveAbstract : masterMove tests to tests/phpunit/ and remove hook
mediawiki/extensions/CentralAuth : masterRemove 'UnitTestsList' hook
mediawiki/extensions/AntiSpoof : masterMove tests to tests/phpunit/ and remove hook
mediawiki/extensions/AbuseFilter : masterRemove 'UnitTestsList' hook

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 427746 had a related patch set (by Jayprakash12345) published:
[mediawiki/extensions/BlueSpiceChecklist@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427746

Change 427748 had a related patch set (by Jayprakash12345) published:
[mediawiki/extensions/BlueSpiceGroupManager@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427748

Change 427749 had a related patch set (by Jayprakash12345) published:
[mediawiki/extensions/BlueSpiceFoundation@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427749

Change 427750 had a related patch set (by Jayprakash12345) published:
[mediawiki/extensions/BlueSpiceExtendedStatistics@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427750

Change 427752 had a related patch set (by Jayprakash12345) published:
[mediawiki/extensions/BlueSpiceExtendedSearch@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427752

Change 427753 had a related patch set (by Jayprakash12345) published:
[mediawiki/extensions/BlueSpiceDashboards@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427753

Change 427742 merged by jenkins-bot:
[mediawiki/extensions/SendGrid@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427742

D3r1ck01 updated the task description. (Show Details)Apr 19 2018, 7:32 PM

Change 427753 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceDashboards@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427753

Change 427745 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceContextMenu@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427745

Change 427752 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceExtendedSearch@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427752

Change 427750 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceExtendedStatistics@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427750

Change 427748 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceGroupManager@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427748

Change 427746 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceChecklist@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427746

Change 427740 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceInsertFile@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427740

Change 427739 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceInsertMagic@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427739

Change 427733 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceRSSFeeder@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427733

Change 427724 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceAvatars@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427724

Change 303349 merged by jenkins-bot:
[mediawiki/extensions/BaseHooks@master] Move tests to tests/phpunit/ and remove hook

https://gerrit.wikimedia.org/r/303349

Change 427721 merged by jenkins-bot:
[mediawiki/extensions/NewUserActions@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427721

Change 427725 merged by jenkins-bot:
[mediawiki/extensions/MultiLanguageManager@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427725

Change 427716 merged by jenkins-bot:
[mediawiki/extensions/OAuthAuthentication@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427716

Change 427741 merged by jenkins-bot:
[mediawiki/extensions/NSFileRepo@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427741

Change 427726 merged by jenkins-bot:
[mediawiki/extensions/MolHandler@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427726

Change 427736 merged by Umherirrender:
[mediawiki/extensions/BlueSpiceNamespaceManager@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427736

Change 427731 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceSmartList@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427731

Change 427735 merged by Umherirrender:
[mediawiki/extensions/BlueSpicePageAssignments@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427735

Change 427730 merged by Umherirrender:
[mediawiki/extensions/BlueSpiceUserManager@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427730

Change 427738 merged by Umherirrender:
[mediawiki/extensions/BlueSpiceInterWikiLinks@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427738

Change 427732 merged by Umherirrender:
[mediawiki/extensions/BlueSpiceReaders@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427732

Change 427734 merged by Umherirrender:
[mediawiki/extensions/BlueSpicePageTemplates@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427734

Change 427706 merged by Umherirrender:
[mediawiki/extensions/PhpTagsWiki@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427706

Change 427713 merged by Umherirrender:
[mediawiki/extensions/PhpTags@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427713

Change 427749 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceFoundation@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427749

Change 427712 merged by Umherirrender:
[mediawiki/extensions/PhpTagsFunctions@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427712

Change 427708 merged by Umherirrender:
[mediawiki/extensions/PhpTagsWidgets@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427708

Change 427711 merged by Umherirrender:
[mediawiki/extensions/PhpTagsSMW@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427711

Reedy removed a subscriber: Reedy.Apr 20 2018, 8:01 PM

Change 428056 had a related patch set uploaded (by Gopavasanth; owner: Gopavasanth):
[mediawiki/extensions/PageForms@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/428056

Change 428057 had a related patch set uploaded (by Gopavasanth; owner: Gopavasanth):
[mediawiki/extensions/MathSearch@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/428057

Change 428059 had a related patch set uploaded (by Gopavasanth; owner: Gopavasanth):
[mediawiki/extensions/DonationInterface@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/428059

Change 428060 had a related patch set uploaded (by Physikerwelt; owner: Physikerwelt):
[mediawiki/extensions/Math@master] Move phpunit test files

https://gerrit.wikimedia.org/r/428060

Change 428057 merged by jenkins-bot:
[mediawiki/extensions/MathSearch@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/428057

Gopavasanth updated the task description. (Show Details)Apr 21 2018, 3:05 PM

Change 428060 merged by jenkins-bot:
[mediawiki/extensions/Math@master] Move phpunit test files

https://gerrit.wikimedia.org/r/428060

Change 427715 merged by jenkins-bot:
[mediawiki/extensions/PagedTiffHandler@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/427715

Change 302996 abandoned by Jforrester:
Move tests to tests/phpunit/ and remove hook

Reason:
Done in Iac91c86fc66ef99bbc838b7458e8efcdcd2bcfb8.

https://gerrit.wikimedia.org/r/302996

jeblad added a subscriber: jeblad.Dec 30 2018, 6:37 PM

Please mark hooks as deprecated before such changes, and update the documentation accordingly.
This (in combo with a change in PHPunit) trigger some very strange bugs.

@jeblad: Since August 2016, https://phabricator.wikimedia.org/source/mediawiki/browse/master/maintenance/convertExtensionToRegistration.php$254-260 has

if ( $hookName === 'UnitTestsList' ) {
	$this->output( "Note: the UnitTestsList hook is no longer necessary as " .
		"long as your tests are located in the \"tests/phpunit/\" directory. " .
		"Please see <https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/" .
	"Writing_unit_tests_for_extensions#Register_your_tests> for more details.\n"
	);
}

To clarify, which other kind of deprecation and documentation would you have expected and where?
The current policy is at https://www.mediawiki.org/wiki/Deprecation_policy

Change 428056 merged by jenkins-bot:
[mediawiki/extensions/PageForms@master] Remove 'UnitTestList' hook

https://gerrit.wikimedia.org/r/428056

Nikitrain updated the task description. (Show Details)Mar 31 2019, 9:04 AM