作曲家在作曲家 GitBash 上安装 Sylius 时超过了 300 秒的超时


composer exceeded the timeout of 300 seconds while installing Sylius on composer GitBash

我试图通过Windows(WAMP)中的Git bash安装Sylius composer create-project -s dev sylius/sylius并得到了这个

[Symfony'Component'Process'Exception'ProcessTimedOutException]
The process ""c:'wamp'bin'php'php5.5.12'php.exe" "app/console" assets:insta
ll "web"" exceeded the timeout of 300 seconds.

我换了皮.ini

realpath_cache_size = 16k
realpath_cache_ttl = 120
memory_limit = 512M //było 128M
max_input_time = 600 //60
max_execution_time = 120

我在 MINGW32 年(Windows 中的 bash)中export COMPOSER_PROCESS_TIMEOUT=6000 ( defaults to 300 )更改作曲家超时,如下所示 https://stackoverflow.com/a/18917919/3190476

我这样做$cfg['ExecTimeLimit'] = 0;就像这里一样 https://stackoverflow.com/a/17466797/3190476

一次性

解决方案

COMPOSER_PROCESS_TIMEOUT=2000 php composer.phar install

或者添加到作曲家注册表,如果您像我一样全局使用它

composer --global config process-timeout 2000

我在这里找到了解决方案:http://www.papayasoft.com/2013/08/22/composer-process-timeout-when-fetching-large-repositories/

在 composer.json 文件中添加配置选项这是您项目的最佳解决方案仅将进程超时键和值添加到 0

{....
"config": {
    "process-timeout":0
  }
}