{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/4493","labels_url":"https://api.github.com/repos/composer/composer/issues/4493/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/4493/comments","events_url":"https://api.github.com/repos/composer/composer/issues/4493/events","html_url":"https://github.com/composer/composer/issues/4493","id":110845493,"number":4493,"title":"Multiple \"vendor\" folders","user":{"login":"Ziggizag","id":2280036,"avatar_url":"https://avatars.githubusercontent.com/u/2280036?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziggizag","html_url":"https://github.com/Ziggizag","followers_url":"https://api.github.com/users/Ziggizag/followers","following_url":"https://api.github.com/users/Ziggizag/following{/other_user}","gists_url":"https://api.github.com/users/Ziggizag/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziggizag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziggizag/subscriptions","organizations_url":"https://api.github.com/users/Ziggizag/orgs","repos_url":"https://api.github.com/users/Ziggizag/repos","events_url":"https://api.github.com/users/Ziggizag/events{/privacy}","received_events_url":"https://api.github.com/users/Ziggizag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-11T09:34:35Z","updated_at":"2015-10-11T11:54:11Z","closed_at":null,"body":"Hi,\r\n\r\nI use Composer to manage my Yii2 applications. To spare server space and resources, I would love to keep core framework files as well as its \"default\" set of extensions shared between individual applications located in many virtual hosts. But on the other hand I would like to let each and every individual application to keep it's own set of \"private\" extensions.\r\n\r\nThus is my question - is there any way to let an application use two independent \"vendor\" folders - one shared between many apps and one dedicated to a single app? That would require and application to use two different ComposerAutoloader instances.\r\n\r\nAny idea?"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/147185990","html_url":"https://github.com/composer/composer/issues/4493#issuecomment-147185990","issue_url":"https://api.github.com/repos/composer/composer/issues/4493","id":147185990,"user":{"login":"rquadling","id":12801,"avatar_url":"https://avatars.githubusercontent.com/u/12801?v=3","gravatar_id":"","url":"https://api.github.com/users/rquadling","html_url":"https://github.com/rquadling","followers_url":"https://api.github.com/users/rquadling/followers","following_url":"https://api.github.com/users/rquadling/following{/other_user}","gists_url":"https://api.github.com/users/rquadling/gists{/gist_id}","starred_url":"https://api.github.com/users/rquadling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rquadling/subscriptions","organizations_url":"https://api.github.com/users/rquadling/orgs","repos_url":"https://api.github.com/users/rquadling/repos","events_url":"https://api.github.com/users/rquadling/events{/privacy}","received_events_url":"https://api.github.com/users/rquadling/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T11:54:11Z","updated_at":"2015-10-11T11:54:11Z","body":"Calling the 2 autoloaders should be OK as long as the same version of composer is used (just in case of bug fixes in composer results in a different interaction with the classmaps/etc.). Make sure you call the local project's autoloader first and then the defaults autoloader. This will deal with any projects using a different version of a default package as it will load first.\r\n\r\nI would recommend using the optimize option for the dump-autoload so full classmaps are generated.\r\n\r\nOther than that, I think all should be OK."}}