Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6021881
AddWikiRestoredServicesProvider.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AddWikiRestoredServicesProvider.php
View Options
<?php
namespace
MediaWiki\Installer\Task
;
use
MediaWiki\MediaWikiServices
;
use
MediaWiki\Status\Status
;
/**
* Scheduled provider for restored services to be used in maintenance/installPreConfigured.php.
*
* It's simpler than RestoredServicesProvider because it just needs to reverse
* disableStorage(). It needs to use the original LBFactory, not a single
* injected connection, so that the configured external clusters are accessible.
*
* @internal
*/
class
AddWikiRestoredServicesProvider
extends
Task
{
public
function
getName
():
string
{
return
'restore-services'
;
}
/** @inheritDoc */
public
function
getDependencies
()
{
return
[
'tables'
];
}
/** @inheritDoc */
public
function
getProvidedNames
()
{
return
'services'
;
}
public
function
execute
():
Status
{
MediaWikiServices
::
resetGlobalInstance
(
null
,
'reload'
);
$services
=
MediaWikiServices
::
getInstance
();
$this
->
getContext
()->
provide
(
'services'
,
$services
);
// Wait for replication, so that the new database will exist in replica servers
$connProvider
=
$services
->
getConnectionProvider
();
$ticket
=
$connProvider
->
getEmptyTransactionTicket
(
__METHOD__
);
$connProvider
->
commitAndWaitForReplication
(
__METHOD__
,
$ticket
);
return
Status
::
newGood
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 15:19 (6 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
23/e6/083edfe9acad513100888babfe5c
Default Alt Text
AddWikiRestoredServicesProvider.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment