mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Merge pull request #3953 from alcohol/allow-numeric-author-name
Allow numeric author name
This commit is contained in:
commit
35a9b5dbf9
2 changed files with 9 additions and 1 deletions
|
@ -40,7 +40,7 @@ class InitCommand extends Command
|
|||
|
||||
public function parseAuthorString($author)
|
||||
{
|
||||
if (preg_match('/^(?P<name>[- \.,\p{L}\'’]+) <(?P<email>.+?)>$/u', $author, $match)) {
|
||||
if (preg_match('/^(?P<name>[- \.,\p{L}\p{N}\'’]+) <(?P<email>.+?)>$/u', $author, $match)) {
|
||||
if ($this->isValidEmail($match['email'])) {
|
||||
return array(
|
||||
'name' => trim($match['name']),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue