Donoven Rally
Donoven Rally

Reputation: 1700

How can i change to location where composer creates the vendor folder

I have project's folder dummyProject and inside of it two folders, src and test, and composer.json file. Problem is when i run the composer install command the vendor folder being created in the dummyProject folder. How can i tell composer to create the vendor folder inside src?? thx..

Upvotes: 6

Views: 4887

Answers (1)

The Humble Rat
The Humble Rat

Reputation: 4696

According to the following: https://groups.google.com/forum/#!topic/composer-dev/CS_I0FNMHwY

You can set a Vendor Path like so:

{ 
  "config": { 
    "vendor-dir": "libs/" 
  } 
} 

Looking at this question How to get multiple vendor directories with composer?, it appears you cannot set two different paths for vendor files (not sure if you will need to do this also), but the questions shows that with a symlnk this can be achieved.

Also see the following regarding changing the vendor location: How to specify Composer install path?

Upvotes: 7

Related Questions