composer update

This commit is contained in:
zyimm 2023-07-09 16:27:03 +08:00
parent fdaf23e5c2
commit fdcb6b1805

View File

@ -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);
}
}