directoryList = $directoryList; $this->composerJsonFinder = $composerJsonFinder; } /** * Create \Composer\Composer * * @return \Composer\Composer * @throws \Exception */ public function create() { putenv('COMPOSER_HOME=' . $this->directoryList->getPath(DirectoryList::COMPOSER_HOME)); return \Composer\Factory::create( new BufferIO(), $this->composerJsonFinder->findComposerJson() ); } }