Search code examples
phpcomposer-phpyii2

Install package on non-empty folder using composer


I tried to install package via composer but it's keep telling me that this directory is not empty so how can I install package on non-empty folder using composer ? is there force install command ?

error message:

  [InvalidArgumentException]
  Project directory Yii-GZero-2b/ is not empty.

Solution

  • You currently can't. There is/was a discussion going on over on GitHub which you can read about here: https://github.com/composer/composer/issues/1135.

    For now however, you'll need to create a new directory and then migrate your files over, or vice-versa.