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)
[RuntimeException]
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] ... [
packagesN]
Composer can be good for update, but it brings lot of trash so bad we can’t filter…
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.