1
0
Fork 0

Return non zero exit code on deprecation

pull/8013/head
Patrick Reimers 2019-03-01 19:39:07 +01:00
parent ba1e5c213c
commit 627a832cc1
No known key found for this signature in database
GPG Key ID: 6A47322A0E80596C
1 changed files with 3 additions and 1 deletions

View File

@ -195,7 +195,9 @@ class ValidatingArrayLoader implements LoaderInterface
foreach (array_keys(BasePackage::$supportedLinkTypes) as $linkType) {
if ($this->validateArray($linkType) && isset($this->config[$linkType])) {
foreach ($this->config[$linkType] as $package => $constraint) {
if (!preg_match('{^[A-Za-z0-9_./-]+$}', $package)) {
if ($err = self::hasPackageNamingError($package, true)) {
$this->warnings[] = 'Deprecation warning: '.$linkType.'.'.$err.' Make sure you fix this as Composer 2.0 will error.';
} elseif (!preg_match('{^[A-Za-z0-9_./-]+$}', $package)) {
$this->warnings[] = $linkType.'.'.$package.' : invalid key, package names must be strings containing only [A-Za-z0-9_./-]';
}
if (!is_string($constraint)) {