1
0
Fork 0

Add deprecation warning for name attribute

pull/8013/head
Patrick Reimers 2019-03-05 10:44:55 +01:00
parent 5d14a95543
commit 8ae8d131d5
No known key found for this signature in database
GPG Key ID: 6A47322A0E80596C
1 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,10 @@ class ValidatingArrayLoader implements LoaderInterface
$this->warnings = array();
$this->config = $config;
if ($err = self::hasPackageNamingError($config['name'])) {
$this->warnings[] = 'Deprecation warning: Your package name '.$err.' Make sure you fix this as Composer 2.0 will error.';
}
if ($this->strictName) {
$this->validateRegex('name', '[A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*', true);
} else {