From c15eba3fe36ea58db866c382759a36bc67c0ba83 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 25 Nov 2021 10:20:47 +0100 Subject: [PATCH] Turn naming errors into hard failures in validating array loader --- src/Composer/Package/Loader/ValidatingArrayLoader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package/Loader/ValidatingArrayLoader.php b/src/Composer/Package/Loader/ValidatingArrayLoader.php index 934556458..9fd890385 100644 --- a/src/Composer/Package/Loader/ValidatingArrayLoader.php +++ b/src/Composer/Package/Loader/ValidatingArrayLoader.php @@ -64,7 +64,7 @@ class ValidatingArrayLoader implements LoaderInterface $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.'; + $this->errors[] = 'Your package name '.$err; } if ($this->strictName) { @@ -247,7 +247,7 @@ class ValidatingArrayLoader implements LoaderInterface continue; } if ($err = self::hasPackageNamingError($package, true)) { - $this->warnings[] = 'Deprecation warning: '.$linkType.'.'.$err.' Make sure you fix this as Composer 2.0 will error.'; + $this->errors[] = $linkType.'.'.$err; } 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_./-]'; }