Fix validating array loader handling of invalid target branch datatype
parent
f4e2b389a1
commit
61fba697a0
|
@ -347,6 +347,13 @@ class ValidatingArrayLoader implements LoaderInterface
|
|||
$this->errors[] = 'extra.branch-alias : must be an array of versions => aliases';
|
||||
} else {
|
||||
foreach ($this->config['extra']['branch-alias'] as $sourceBranch => $targetBranch) {
|
||||
if (!is_string($targetBranch)) {
|
||||
$this->warnings[] = 'extra.branch-alias.'.$sourceBranch.' : the target branch ('.json_encode($targetBranch).') must be a string, "'.gettype($targetBranch).'" received.';
|
||||
unset($this->config['extra']['branch-alias'][$sourceBranch]);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// ensure it is an alias to a -dev package
|
||||
if ('-dev' !== substr($targetBranch, -4)) {
|
||||
$this->warnings[] = 'extra.branch-alias.'.$sourceBranch.' : the target branch ('.$targetBranch.') must end in -dev';
|
||||
|
|
Loading…
Reference in New Issue