Downgrade naming errors to warnings again in package links to avoid BC issues with tags on packagist
parent
da322643d6
commit
f1f013edde
|
@ -258,9 +258,9 @@ class ValidatingArrayLoader implements LoaderInterface
|
|||
continue;
|
||||
}
|
||||
if ($err = self::hasPackageNamingError($package, true)) {
|
||||
$this->errors[] = $linkType.'.'.$err;
|
||||
$this->warnings[] = $linkType.'.'.$err;
|
||||
} elseif (!Preg::isMatch('{^[A-Za-z0-9_./-]+$}', $package)) {
|
||||
$this->warnings[] = $linkType.'.'.$package.' : invalid key, package names must be strings containing only [A-Za-z0-9_./-]';
|
||||
$this->errors[] = $linkType.'.'.$package.' : invalid key, package names must be strings containing only [A-Za-z0-9_./-]';
|
||||
}
|
||||
if (!is_string($constraint)) {
|
||||
$this->errors[] = $linkType.'.'.$package.' : invalid value, must be a string containing a version constraint';
|
||||
|
|
|
@ -352,18 +352,6 @@ class ValidatingArrayLoaderTest extends TestCase
|
|||
'name : Foo/Bar is invalid, it should not contain uppercase characters. We suggest using foo/bar instead.',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'foo/bar',
|
||||
'require' => array(
|
||||
'Foo/Baz' => '^1.0',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'require.Foo/Baz is invalid, it should not contain uppercase characters. Please use foo/baz instead.',
|
||||
),
|
||||
false,
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'foo/bar',
|
||||
|
@ -523,6 +511,18 @@ class ValidatingArrayLoaderTest extends TestCase
|
|||
),
|
||||
false,
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'foo/bar',
|
||||
'require' => array(
|
||||
'Foo/Baz' => '^1.0',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'require.Foo/Baz is invalid, it should not contain uppercase characters. Please use foo/baz instead.',
|
||||
),
|
||||
false,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue