Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from her-cat/master
Browse files Browse the repository at this point in the history
 兼容vendor名称带横杠、下划线的情况
  • Loading branch information
overtrue authored Nov 22, 2019
2 parents f783f97 + f808514 commit 4a9c8b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
// vendor/namespace
$question = new Question("Namespace of package [<fg=yellow>{$defaultNamespace}</fg=yellow>]: ", $defaultNamespace);
$this->info['NAMESPACE'] = $helper->ask($input, $output, $question);
$this->info['VENDOR'] = strtolower(strstr($this->info['NAMESPACE'], '\\', true));
$this->info['VENDOR'] = strtolower(strstr($this->info['PACKAGE_NAME'], '/', true));
$this->info['PACKAGE'] = substr($this->info['PACKAGE_NAME'], strlen($this->info['VENDOR']) + 1);

// description
Expand Down

0 comments on commit 4a9c8b1

Please sign in to comment.