Ver código fonte

Bump memory limit to 1.5G

Jordi Boggiano 8 anos atrás
pai
commit
0bc75c3fb6
2 arquivos alterados com 4 adições e 4 exclusões
  1. 3 3
      bin/composer
  2. 1 1
      src/Composer/Util/IniHelper.php

+ 3 - 3
bin/composer

@@ -41,9 +41,9 @@ if (function_exists('ini_set')) {
     };
 
     $memoryLimit = trim(ini_get('memory_limit'));
-    // Increase memory_limit if it is lower than 1GB
-    if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 1024 * 1024 * 1024) {
-        @ini_set('memory_limit', '1G');
+    // Increase memory_limit if it is lower than 1.5GB
+    if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 1024 * 1024 * 1536) {
+        @ini_set('memory_limit', '1536M');
     }
     unset($memoryInBytes, $memoryLimit);
 }

+ 1 - 1
src/Composer/Util/IniHelper.php

@@ -28,7 +28,7 @@ class IniHelper
      *
      * The equivalent of calling php_ini_loaded_file then php_ini_scanned_files.
      * The loaded ini location is the first entry and may be empty.
-
+     *
      * @return array
      */
     public static function getAll()