Add deprecation warning for name attribute
parent
5d14a95543
commit
8ae8d131d5
|
@ -49,6 +49,10 @@ class ValidatingArrayLoader implements LoaderInterface
|
||||||
$this->warnings = array();
|
$this->warnings = array();
|
||||||
$this->config = $config;
|
$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) {
|
if ($this->strictName) {
|
||||||
$this->validateRegex('name', '[A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*', true);
|
$this->validateRegex('name', '[A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*', true);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue