Fail hard if an invalid root alias is detected
parent
d61c1ccb7c
commit
4a02768591
|
@ -190,6 +190,8 @@ class RootPackageLoader extends ArrayLoader
|
|||
'alias' => $match[2],
|
||||
'alias_normalized' => $this->versionParser->normalize($match[2], $reqVersion),
|
||||
);
|
||||
} elseif (strpos($reqVersion, ' as ') !== false) {
|
||||
throw new \UnexpectedValueException('Invalid alias definition in "'.$reqName.'": "'.$reqVersion.'". Aliases should be in the form "exact-version as other-exact-version".');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue