diff --git a/src/Composer/Json/JsonFile.php b/src/Composer/Json/JsonFile.php old mode 100644 new mode 100755 index 3c3f731fd..dc2538132 --- a/src/Composer/Json/JsonFile.php +++ b/src/Composer/Json/JsonFile.php @@ -300,7 +300,6 @@ class JsonFile return true; } - //throw $result; throw new JsonValidationException('JSON file is not valid "'.$file.'"'."\n".$result->getMessage(), $result->getDetails()); } } diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php old mode 100644 new mode 100755 index 5e924254f..57a2f4f8b --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -122,7 +122,6 @@ class GitHubDriver extends VcsDriver } if (preg_match('{[a-f0-9]{40}}i', $identifier) && $res = $this->cache->read($identifier)) { - //TODO how to get the json file here? $this->infoCache[$identifier] = JsonFile::parseJson($res); } diff --git a/src/Composer/Repository/Vcs/HgDriver.php b/src/Composer/Repository/Vcs/HgDriver.php old mode 100644 new mode 100755 index 31ed5c57c..c7cea695a --- a/src/Composer/Repository/Vcs/HgDriver.php +++ b/src/Composer/Repository/Vcs/HgDriver.php @@ -94,14 +94,13 @@ class HgDriver extends VcsDriver public function getComposerInformation($identifier) { if (!isset($this->infoCache[$identifier])) { - $resource = escapeshellarg($identifier); - $this->process->execute(sprintf('cd %s && hg cat -r %s composer.json', escapeshellarg($this->tmpDir), $resource), $composer); + $this->process->execute(sprintf('cd %s && hg cat -r %s composer.json', escapeshellarg($this->tmpDir), escapeshellarg($identifier)), $composer); if (!trim($composer)) { return; } - $composer = JsonFile::parseJson($composer, $resource); + $composer = JsonFile::parseJson($composer, $identifier); if (!isset($composer['time'])) { $this->process->execute(sprintf('cd %s && hg log --template "{date|rfc822date}" -r %s', escapeshellarg($this->tmpDir), escapeshellarg($identifier)), $output); diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php old mode 100644 new mode 100755 index bc1ed69b2..1589ffb04 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/src/Composer/Repository/Vcs/SvnDriver.php @@ -94,7 +94,6 @@ class SvnDriver extends VcsDriver $identifier = '/' . trim($identifier, '/') . '/'; if ($res = $this->cache->read($identifier.'.json')) { - //TODO how to get the json filename here? $this->infoCache[$identifier] = JsonFile::parseJson($res); } @@ -117,7 +116,7 @@ class SvnDriver extends VcsDriver throw new TransportException($e->getMessage()); } - $composer = JsonFile::parseJson($output, $resource); + $composer = JsonFile::parseJson($output, $this->baseUrl . $resource . $rev); if (!isset($composer['time'])) { $output = $this->execute('svn info', $this->baseUrl . $path . $rev);