Explorar o código

require $name to be lowercase

Colin Frei %!s(int64=12) %!d(string=hai) anos
pai
achega
6c4bdd14cd
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Composer/Command/InitCommand.php

+ 2 - 2
src/Composer/Command/InitCommand.php

@@ -179,9 +179,9 @@ EOT
                     return $name;
                 }
 
-                if (!preg_match('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}i', $value)) {
+                if (!preg_match('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}', $value)) {
                     throw new \InvalidArgumentException(
-                        'The package name '.$value.' is invalid, it should have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+'
+                        'The package name '.$value.' is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+'
                     );
                 }