diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index b16fa21b3..818c8ba14 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -174,6 +174,7 @@ EOT // package names must be in the format foo/bar $name = $name . '/' . $name; } + $name = strtolower($name); } else { if (!preg_match('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}', $name)) { throw new \InvalidArgumentException( @@ -217,8 +218,11 @@ EOT $self = $this; $author = $io->askAndValidate( - 'Author ['.$author.']: ', + 'Author ['.$author.', n to skip]: ', function ($value) use ($self, $author) { + if ($value === 'n' || $value === 'no') { + return; + } $value = $value ?: $author; $author = $self->parseAuthorString($value);