Browse Source

state min HHVM version

Dariusz Ruminski 10 years ago
parent
commit
62898bbd84

+ 6 - 1
Symfony/CS/Resources/phar-stub.php

@@ -10,7 +10,12 @@
  * with this source code in the file LICENSE.
  */
 
-if (version_compare(phpversion(), '5.3.6', '<')) {
+if (defined('HHVM_VERSION_ID')) {
+    if (HHVM_VERSION_ID < 30500) {
+        fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.5.0\n");
+        exit(1);
+    }
+} elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50306) {
     fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.3.6\n");
     exit(1);
 }

+ 0 - 8
Symfony/CS/Tests/Fixer/PSR2/BracesFixerTest.php

@@ -1149,14 +1149,6 @@ while (true) {
      */
     public function test55($expected, $input = null)
     {
-        // if T_FINALLY does not exist then skip test
-        // may occur on hhvm, see: https://github.com/facebook/hhvm/issues/3703
-        if (!defined('T_FINALLY')) {
-            $this->markTestSkipped('Lack of T_FINALLY token.');
-
-            return;
-        }
-
         $this->makeTest($expected, $input);
     }
 

+ 0 - 15
Symfony/CS/Tokenizer/Tokens.php

@@ -1177,21 +1177,6 @@ class Tokens extends \SplFixedArray
         return false;
     }
 
-    /**
-     * If $index is below zero, we know that it does not exist.
-     *
-     * This was added to be compatible with HHVM 3.2.0.
-     * Note that HHVM 3.3.0 no longer requires this work around.
-     *
-     * @param int $index
-     *
-     * @return bool
-     */
-    public function offsetExists($index)
-    {
-        return $index >= 0 && parent::offsetExists($index);
-    }
-
     /**
      * Removes all the leading whitespace.
      *

+ 6 - 1
php-cs-fixer

@@ -14,7 +14,12 @@
  * @author Fabien Potencier <fabien@symfony.com>
  */
 
-if (version_compare(phpversion(), '5.3.6', '<')) {
+if (defined('HHVM_VERSION_ID')) {
+    if (HHVM_VERSION_ID < 30500) {
+        fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.5.0\n");
+        exit(1);
+    }
+} elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50306) {
     fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.3.6\n");
     exit(1);
 }