Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / config / check / PhabricatorExtensionsSetupCheck.php
blob51105de1c509ff2df12895fa2ad7ead8ab9904fc
1 <?php
3 final class PhabricatorExtensionsSetupCheck extends PhabricatorSetupCheck {
5 public function getDefaultGroup() {
6 return self::GROUP_PHP;
9 public function isPreflightCheck() {
10 return true;
13 protected function executeChecks() {
14 // TODO: Make 'mbstring' a soft requirement.
16 $required = array(
17 'hash',
18 'json',
19 'openssl',
20 'mbstring',
21 'ctype',
23 // There is a tiny chance we might not need this, but a significant
24 // number of applications require it and it's widely available.
25 'curl',
28 $need = array();
29 foreach ($required as $extension) {
30 if (!extension_loaded($extension)) {
31 $need[] = $extension;
35 if (!extension_loaded('mysqli') && !extension_loaded('mysql')) {
36 $need[] = 'mysqli or mysql';
39 if (!$need) {
40 return;
43 $message = pht('Required PHP extensions are not installed.');
45 $issue = $this->newIssue('php.extensions')
46 ->setIsFatal(true)
47 ->setName(pht('Missing Required Extensions'))
48 ->setMessage($message);
50 foreach ($need as $extension) {
51 $issue->addPHPExtension($extension);