Cosmetic fixes

main
Jordi Boggiano 12 years ago
parent 76f727b273
commit 8ffe3c2e26

@ -2,7 +2,7 @@
* Schema: Added references for dev versions, requiring `dev-master#abcdef` for example will force the abcdef commit
* Added `require` command to add a package to your requirements and install it
* Added a whitelist to `update. Calling `composer update foo/bar foo/baz` allows you to update only those packages
* Added a whitelist to `update`. Calling `composer update foo/bar foo/baz` allows you to update only those packages
* Added caching of GitHub metadata (faster startup time with custom GitHub VCS repos)
* Added support for file:// URLs to GitDriver
* Added --dev flag to `create-project` command

@ -70,7 +70,7 @@ EOT
$requireKey = $input->getOption('dev') ? 'require-dev' : 'require';
$baseRequirements = array_key_exists($requireKey, $composer) ? $composer[$requireKey] : array();
$requirements = $this->formatRequirements($requirements);
$requirements = $this->formatRequirements($requirements);
if (!$this->updateFileCleanly($json, $baseRequirements, $requirements, $requireKey)) {
foreach ($requirements as $package => $version) {

@ -337,7 +337,7 @@ class Installer
} else {
// force update to latest on update
if ($this->update) {
// skip package is the whitelist is enabled and it is not in it
// skip package if the whitelist is enabled and it is not in it
if ($this->updateWhitelist && !in_array($package->getName(), $this->updateWhitelist)) {
continue;
}

@ -23,11 +23,12 @@ class JsonManipulator
public function __construct($contents)
{
if (!preg_match('#^\{(.*)\}$#s', trim($contents), $match)) {
$contents = trim($contents);
if (!preg_match('#^\{(.*)\}$#s', $contents)) {
throw new \InvalidArgumentException('The json file must be an object ({})');
}
$this->newline = false !== strpos("\r\n", $contents) ? "\r\n": "\n";
$this->contents = '{' . $match[1] . '}';
$this->contents = $contents;
$this->detectIndenting();
}

Loading…
Cancel
Save