1
0
Fork 0

require $name to be lowercase

pull/1349/head
Colin Frei 2012-11-20 20:49:45 +01:00
parent 6f56568881
commit 6c4bdd14cd
1 changed files with 2 additions and 2 deletions

View File

@ -179,9 +179,9 @@ EOT
return $name; 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( 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_.-]+'
); );
} }