Allow reset of global services.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 12 Oct 2015 08:05:45 +0000 (10:05 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 11 Apr 2016 14:22:40 +0000 (16:22 +0200)
commit8e7a0a0912bb98a4a12375b354e23f03262bf213
tree9e26fdcf659119e32dd566f675db7776fa485afa
parent31292c688ef972cd4a826e064fa229c3ec577433
Allow reset of global services.

This change provides a mechanism to reset global service instances
in an orderly manner. There are three use cases for this:

* the installation process
* forking processes
* integration tests (which must of the existing phpunit tests are)

Depends-On: I5d638ad415fc3840186a0beaa09ac02ea688539b
Change-Id: Ie98bf5af59208f186dba59a9e971c72ea0b63e69
32 files changed:
autoload.php
docs/hooks.txt
docs/injection.txt
includes/ForkController.php
includes/GlobalFunctions.php
includes/MediaWikiServices.php
includes/ServiceWiring.php
includes/Services/CannotReplaceActiveServiceException.php [new file with mode: 0644]
includes/Services/ContainerDisabledException.php [new file with mode: 0644]
includes/Services/DestructibleService.php [new file with mode: 0644]
includes/Services/NoSuchServiceException.php [new file with mode: 0644]
includes/Services/ServiceAlreadyDefinedException.php [new file with mode: 0644]
includes/Services/ServiceContainer.php
includes/Services/ServiceDisabledException.php [new file with mode: 0644]
includes/Setup.php
includes/config/ConfigFactory.php
includes/context/RequestContext.php
includes/db/loadbalancer/LBFactory.php
includes/db/loadbalancer/LoadBalancer.php
includes/installer/DatabaseInstaller.php
includes/installer/Installer.php
includes/session/SessionManager.php
includes/site/SiteSQLStore.php
includes/user/CentralIdLookup.php
maintenance/rebuildLocalisationCache.php
tests/parser/parserTest.inc
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/MediaWikiServicesTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/Services/ServiceContainerTest.php
tests/phpunit/includes/config/ConfigFactoryTest.php
tests/phpunit/phpunit.php