+ if ($this->composerRoot && file_exists($this->composerRoot . '/composer.json')) {
+ $json = json_decode(
+ file_get_contents($path . '/composer.json'),
+ true
+ );
+ if (is_array($json) && isset($json['config']['vendor-dir'])) {
+ $this->vendorDir = $this->composerRoot . '/' . $json['config']['vendor-dir'];
+ }
+ }