Explorar el Código

Allow unicode characters for author in "composer init" command.

Jérôme Tamarelle hace 13 años
padre
commit
dd6608e4c2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Composer/Command/InitCommand.php

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

@@ -33,7 +33,7 @@ class InitCommand extends Command
 
     public function parseAuthorString($author)
     {
-        if (preg_match('/^(?P<name>[- \.,a-z0-9]+) <(?P<email>.+?)>$/i', $author, $match)) {
+        if (preg_match('/^(?P<name>[- \.,\w]+) <(?P<email>.+?)>$/u', $author, $match)) {
             if (!function_exists('filter_var') || $match['email'] === filter_var($match['email'], FILTER_VALIDATE_EMAIL)) {
                 return array(
                     'name'  => trim($match['name']),