Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorPHPConfigSetupCheck.php
| <?php | <?php | ||||
| final class PhabricatorPHPConfigSetupCheck extends PhabricatorSetupCheck { | final class PhabricatorPHPConfigSetupCheck extends PhabricatorSetupCheck { | ||||
| public function getDefaultGroup() { | public function getDefaultGroup() { | ||||
| return self::GROUP_PHP; | return self::GROUP_PHP; | ||||
| } | } | ||||
| public function getExecutionOrder() { | public function getExecutionOrder() { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| protected function executeChecks() { | protected function executeChecks() { | ||||
| if (version_compare(phpversion(), 7, '>=')) { | |||||
| $message = pht( | |||||
| 'This version of Phabricator does not support PHP 7. You '. | |||||
| 'are running PHP %s.', | |||||
| phpversion()); | |||||
| $this->newIssue('php.version7') | |||||
| ->setIsFatal(true) | |||||
| ->setName(pht('PHP 7 Not Supported')) | |||||
| ->setMessage($message) | |||||
| ->addLink( | |||||
| 'https://phurl.io/u/php7', | |||||
| pht('Phabricator PHP 7 Compatibility Information')); | |||||
| return; | |||||
| } | |||||
| $safe_mode = ini_get('safe_mode'); | $safe_mode = ini_get('safe_mode'); | ||||
| if ($safe_mode) { | if ($safe_mode) { | ||||
| $message = pht( | $message = pht( | ||||
| "You have '%s' enabled in your PHP configuration, but Phabricator ". | "You have '%s' enabled in your PHP configuration, but Phabricator ". | ||||
| "will not run in safe mode. Safe mode has been deprecated in PHP 5.3 ". | "will not run in safe mode. Safe mode has been deprecated in PHP 5.3 ". | ||||
| "and removed in PHP 5.4.\n\nDisable safe mode to continue.", | "and removed in PHP 5.4.\n\nDisable safe mode to continue.", | ||||
| 'safe_mode'); | 'safe_mode'); | ||||
| ▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines | |||||