From 84283817a8ea115d553bd31ed7e9a54bc7cbfd7c Mon Sep 17 00:00:00 2001 From: hexianghui Date: Tue, 18 Jun 2019 14:13:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=BC=E5=AE=B9vendor=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=B8=A6=E6=A8=AA=E6=9D=A0=E3=80=81=E4=B8=8B=E5=88=92=E7=BA=BF?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Commands/BuildCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index c7f1188..ec12eee 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output) // vendor/namespace $question = new Question("Namespace of package [{$defaultNamespace}]: ", $defaultNamespace); $this->info['NAMESPACE'] = $helper->ask($input, $output, $question); - $this->info['VENDOR'] = strtolower(strstr($this->info['NAMESPACE'], '\\', true)); + $this->info['VENDOR'] = strtolower(explode('/', $this->info['PACKAGE_NAME'])[0]); $this->info['PACKAGE'] = substr($this->info['PACKAGE_NAME'], strlen($this->info['VENDOR']) + 1); // description From f808514c4fcc57dab007635bc3c97a4bf13727ca Mon Sep 17 00:00:00 2001 From: hexianghui Date: Fri, 21 Jun 2019 01:50:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20strstr=20=E4=BB=A3?= =?UTF-8?q?=E6=9B=BF=20explode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Commands/BuildCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index ec12eee..2b50f22 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output) // vendor/namespace $question = new Question("Namespace of package [{$defaultNamespace}]: ", $defaultNamespace); $this->info['NAMESPACE'] = $helper->ask($input, $output, $question); - $this->info['VENDOR'] = strtolower(explode('/', $this->info['PACKAGE_NAME'])[0]); + $this->info['VENDOR'] = strtolower(strstr($this->info['PACKAGE_NAME'], '/', true)); $this->info['PACKAGE'] = substr($this->info['PACKAGE_NAME'], strlen($this->info['VENDOR']) + 1); // description