directoryList = $directoryList; } /** * Find absolute path to root Composer json file * * @return string * @throws \Exception */ public function findComposerJson() { $composerJson = $this->directoryList->getPath(DirectoryList::ROOT) . '/composer.json'; $composerJson = realpath($composerJson); if ($composerJson === false) { throw new \Exception('Composer file not found'); } return $composerJson; } }