Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F465880
PhabricatorSetupEngine.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
PhabricatorSetupEngine.php
View Options
<?php
final
class
PhabricatorSetupEngine
extends
Phobject
{
private
$issues
;
public
function
getIssues
()
{
if
(
$this
->
issues
===
null
)
{
throw
new
PhutilInvalidStateException
(
'execute'
);
}
return
$this
->
issues
;
}
public
function
getUnresolvedIssues
()
{
$issues
=
$this
->
getIssues
();
$issues
=
mpull
(
$issues
,
null
,
'getIssueKey'
);
$unresolved_keys
=
PhabricatorSetupCheck
::
getUnignoredIssueKeys
(
$issues
);
return
array_select_keys
(
$issues
,
$unresolved_keys
);
}
public
function
execute
()
{
$issues
=
PhabricatorSetupCheck
::
runNormalChecks
();
$fatal_issue
=
null
;
foreach
(
$issues
as
$issue
)
{
if
(
$issue
->
getIsFatal
())
{
$fatal_issue
=
$issue
;
break
;
}
}
if
(
$fatal_issue
)
{
// If we've discovered a fatal, we reset any in-flight state to push
// web hosts out of service.
// This can happen if Phabricator starts during a disaster and some
// databases can not be reached. We allow Phabricator to start up in
// this situation, since it may still be able to usefully serve requests
// without risk to data.
// However, if databases later become reachable and we learn that they
// are fatally misconfigured, we want to tear the world down again
// because data may be at risk.
PhabricatorSetupCheck
::
resetSetupState
();
return
PhabricatorSetupCheck
::
newIssueResponse
(
$issue
);
}
$issue_keys
=
PhabricatorSetupCheck
::
getUnignoredIssueKeys
(
$issues
);
PhabricatorSetupCheck
::
setOpenSetupIssueKeys
(
$issue_keys
,
$update_database
=
true
);
$this
->
issues
=
$issues
;
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 11:44 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
78571
Default Alt Text
PhabricatorSetupEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment