From fdcb6b180566a0d8fdf40658a3f2e14ce4f15f08 Mon Sep 17 00:00:00 2001 From: zyimm Date: Sun, 9 Jul 2023 16:27:03 +0800 Subject: [PATCH] composer update --- src/Vendor.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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); } }