]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Require PHP 5.3.0 on Windows
authorvrana <jakubv@fb.com>
Mon, 17 Sep 2012 20:53:04 +0000 (13:53 -0700)
committervrana <jakubv@fb.com>
Mon, 17 Sep 2012 21:08:17 +0000 (14:08 -0700)
Test Plan:
  $ arc diff

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3506

scripts/arcanist.php

index 319b3e016cf0cf76343bd857f05255a3a0476260..6669b0b29e62bda6ea058a6491f1b012d936806e 100755 (executable)
@@ -349,7 +349,11 @@ try {
  * that exclude core functionality.
  */
 function sanity_check_environment() {
-  $min_version = '5.2.3';
+  // NOTE: We don't have phutil_is_windows() yet here.
+  $is_windows = (DIRECTORY_SEPARATOR != '/');
+
+  // We use stream_socket_pair() which is not available on Windows earlier.
+  $min_version = ($is_windows ? '5.3.0' : '5.2.3');
   $cur_version = phpversion();
   if (version_compare($cur_version, $min_version, '<')) {
     die_with_bad_php(
@@ -358,9 +362,7 @@ function sanity_check_environment() {
       "'{$min_version}'.");
   }
 
-  // NOTE: We don't have phutil_is_windows() yet here.
-
-  if (DIRECTORY_SEPARATOR != '/') {
+  if ($is_windows) {
     $need_functions = array(
       'curl_init'     => array('builtin-dll', 'php_curl.dll'),
     );