DevWL
DevWL

Reputation: 18840

Composer take too long tu update/install Symfony project (on Windows 10)

Why is 'composer update' running so slow when updating a Symfony project on Windows? If I run diagnose everything looks fine, but the update command takes like 25 min or something. Anyone knows whats is going on?

$ composer diagnose
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK

And here are my php module:

$ php -m
[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

As you can see Xdebug is not ON. Anyone knows what cause composer to run so slow (while Internet speed is decent)? Are virtual machines (i.e. VirtualBox) with Ubuntu on it + Putty the only solution to this issue?

Ps. Symfony 2.4.10 is not supported by Symfony installer.

Composer is stoping at:

> post-update-cmd: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile

Upvotes: 0

Views: 852

Answers (2)

Chuck Norris
Chuck Norris

Reputation: 1125

try

 composer config --global repo.packagist composer https://packagist.org

Upvotes: 0

Wouter J
Wouter J

Reputation: 41934

A thing to improve the version resolve speed is by narrowing down the version constraints yourself. In general, I recommend applications to use pretty narrow version constraints (while packages should use the widest version constraints supported). This especially applies to the symfony/symfony version, as there are many versions.

For instance, assume your composer.json file contains something like this: ~2.3. This will simply resolve to the latest version in the 2.x series, which is 2.8. So you can bypass 100 versions (all 2.3-2.7 releases) by setting your version constraint to ~2.8. The result will be the same.

Upvotes: 2

Related Questions