Fix formatRequirements return value, fixes #1026
parent
99c33a54fd
commit
41fc6ff9ee
|
@ -88,12 +88,16 @@ EOT
|
||||||
unset($options['author']);
|
unset($options['author']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$options['require'] = isset($options['require']) ?
|
$options['require'] = isset($options['require']) ? $this->formatRequirements($options['require']) : new \stdClass;
|
||||||
$this->formatRequirements($options['require']) :
|
if (array() === $options['require']) {
|
||||||
new \stdClass;
|
$options['require'] = new \stdClass;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($options['require-dev'])) {
|
if (isset($options['require-dev'])) {
|
||||||
$options['require-dev'] = $this->formatRequirements($options['require-dev']) ;
|
$options['require-dev'] = $this->formatRequirements($options['require-dev']) ;
|
||||||
|
if (array() === $options['require-dev']) {
|
||||||
|
$options['require-dev'] = new \stdClass;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = new JsonFile('composer.json');
|
$file = new JsonFile('composer.json');
|
||||||
|
@ -360,7 +364,7 @@ EOT
|
||||||
$requires[$packageName] = $packageVersion;
|
$requires[$packageName] = $packageVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
return empty($requires) ? new \stdClass : $requires;
|
return $requires;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function normalizeRequirement($requirement)
|
protected function normalizeRequirement($requirement)
|
||||||
|
|
Loading…
Reference in New Issue