diff --git a/src/Vendor.php b/src/Vendor.php index aeec950..d1bc015 100644 --- a/src/Vendor.php +++ b/src/Vendor.php @@ -31,14 +31,13 @@ class Vendor extends LibraryInstaller protected function config(PackageInterface $package): PackageInterface { - var_dump($package->getExtra()); if ($this->composer->getPackage()->getType() == 'project') { $extra = $package->getExtra(); - if (!empty($extra['think-config'])) { + if (!empty($extra['rocket_mq']['config'])) { $configDir = 'config'; $this->filesystem->ensureDirectoryExists($configDir); //配置文件 - foreach ((array)$extra['think-config'] as $name => $config) { + foreach ((array)$extra['rocket_mq']['config'] as $name => $config) { $this->copyFile($configDir, $package, $name, $config); } } @@ -48,14 +47,13 @@ class Vendor extends LibraryInstaller protected function route(PackageInterface $package): PackageInterface { - var_dump($package->getExtra()); if ($this->composer->getPackage()->getType() == 'project') { $extra = $package->getExtra(); - if (!empty($extra['think-route'])) { + if (!empty($extra['rocket_mq']['route'])) { $configDir = 'route'; $this->filesystem->ensureDirectoryExists($configDir); //配置文件 - foreach ((array)$extra['think-route'] as $name => $config) { + foreach ((array)$extra['rocket_mq']['route'] as $name => $config) { $this->copyFile($configDir, $package, $name, $config); } }