symfony composer question

Discuss installing Symfony 2 here

Moderators: tiagojsag, dcobalt

symfony composer question

Postby spiderjoe02 » Thu Nov 22, 2012 8:43 am

Hi, I'm new to symfony and composer. I've managed to install symfony on my local computer (using windows).

The problem is when i execute:
Code: Select all
php composer.phar update

the total size of the vendor directory is over 100 MB. Is this right?
I've noticed that .git directory is the cause of this. How can I copy just the code, not the repository?
My point is I need to make the size of my site as minimal as possible.

Note: I'm using the standard composer.json comes from symfony installation.

Please help. Thanks before.
spiderjoe02
Junior Member
 
Posts: 8
Joined: Tue Feb 10, 2009 4:12 pm
Location: Indonesia

Re: symfony composer question

Postby tiagojsag » Thu Nov 22, 2012 10:26 am

Hi,

Apart from the code itself, composer only downloads .git files, which are usually really really small. After you run composer.phar update/install, you can delete those, but you'd have to repeat that process after each update/install, and I'm not sure how composer would behave if you did that.

cheers
Tiago Garcia
@tiagojsag

Core Web Developer @ Shopware
http://www.shopware.de
User avatar
tiagojsag
Faithful Member
 
Posts: 885
Joined: Wed Aug 10, 2011 4:58 pm

Re: symfony composer question

Postby spiderjoe02 » Thu Nov 22, 2012 7:32 pm

Hi tiagojsag,
Thanks for the reply

I found out that i can fix this by using "--prefer-dist" flag. .git directory is not downloaded by composer. Is this okay?

Thanks
spiderjoe02
Junior Member
 
Posts: 8
Joined: Tue Feb 10, 2009 4:12 pm
Location: Indonesia

Re: symfony composer question

Postby tiagojsag » Thu Nov 22, 2012 7:50 pm

I'm not composer proficient, I just use the basics of it. But if you really need to save up on space, and that flag removes .git stuff, go ahead ;)
Tiago Garcia
@tiagojsag

Core Web Developer @ Shopware
http://www.shopware.de
User avatar
tiagojsag
Faithful Member
 
Posts: 885
Joined: Wed Aug 10, 2011 4:58 pm

Re: symfony composer question

Postby dreipunktnull » Fri Dec 07, 2012 11:18 am

spiderjoe02 wrote:Is this okay?
Yes, it is. It's also the preferred way in production.
User avatar
dreipunktnull
Faithful Member
 
Posts: 1244
Joined: Fri Jun 17, 2011 10:03 am
Location: Germany


Return to Installation and setup

Who is online

Users browsing this forum: No registered users and 1 guest