[Runtimeexception] Composer Update On Yii2-Composer


After using composer for some time i notice useless .git folders, it takes very space so i dicide to remove them all…

After a update i see that composer only install if .git folder is present, otherwise it return a error, so i remove intire lib folder under assets and solve the problem.

The problem now is that i removed .git folder from yii2-composer, and i can’t remove that folder or composer will not work.

So what can i do now to fix this situiation and put composer back to life?

composer update

Loading composer repositories with package information

Updating dependencies (including require-dev)

  - Updating yiisoft/yii2-composer dev-master (47dbc7c => e5614b1)


  The .git directory is missing from D:\wamp\www\agata\vendor\yiisoft\yii2-co

  mposer, see http://getcomposer.org/commit-deps for more information

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]

 [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-

dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [


Composer can be good for update, but it brings lot of trash :( so bad we can’t filter…


unfortunately thats how thing are right now you have leave everything in there

yes the problem is that i removed .git from yii2-composer, and i cant remove this folder or composer will not work…

What can i do??

someone can send me a zip with .git folder from yii2-composer?


I suppose removing yii2-composer (or vendor) folder and running ‘composer update’ should help.

Please also remember there’s --prefer-dist option that can be used as a command to composer to take code archives rather then source, speeding up download as well quite significantly.

I tried that, but as i said, composer update is broken if i remove yii2-composer folder… :(

I use --prefer-dist but it won’t do it since we are working with dev-master sources

Still can send-me the folder?


Have you tried to remove the ‘vendor’ folder before making an update?

I’m sure you may get the .git files making composer install of the library using some other location at your machine.

@yugene if I am not mistaken he wants to git rid of the .git dir

i want both if possible :P

I know .git is necessary now or update don’t work again…

also i need that .git folder :P

but i will copy from a fresh install


@alirz23, yes he wants, but I answered the other request: