diff --git a/installer/OptionalPackages.php b/installer/OptionalPackages.php index a1c48d52..a0ffbd48 100644 --- a/installer/OptionalPackages.php +++ b/installer/OptionalPackages.php @@ -128,7 +128,7 @@ public function installHyperfScript() implode('', $ask), function ($value) { if ($value === 'y' || $value === 'yes') { - throw new \InvalidArgumentException("You should type a time zone name, like Asia/Shanghai. Or type n to skip."); + throw new \InvalidArgumentException('You should type a time zone name, like Asia/Shanghai. Or type n to skip.'); } return $value; diff --git a/installer/resources/config_center/config_acm.php b/installer/resources/config_center/config_acm.php index 59298b4e..e08c65f6 100644 --- a/installer/resources/config_center/config_acm.php +++ b/installer/resources/config_center/config_acm.php @@ -9,7 +9,6 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ -use Hyperf\ConfigApollo\PullMode; use Hyperf\ConfigCenter\Mode; return [ @@ -17,40 +16,6 @@ 'driver' => env('CONFIG_CENTER_DRIVER', 'aliyun_acm'), 'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS), 'drivers' => [ - 'apollo' => [ - 'driver' => Hyperf\ConfigApollo\ApolloDriver::class, - 'pull_mode' => PullMode::INTERVAL, - 'server' => 'http://127.0.0.1:9080', - 'appid' => 'test', - 'cluster' => 'default', - 'namespaces' => [ - 'application', - ], - 'interval' => 5, - 'strict_mode' => false, - 'client_ip' => current(swoole_get_local_ip()), - 'pullTimeout' => 10, - 'interval_timeout' => 1, - ], - 'nacos' => [ - 'driver' => Hyperf\ConfigNacos\NacosDriver::class, - 'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, - 'interval' => 3, - 'default_key' => 'nacos_config', - 'listener_config' => [ - // dataId, group, tenant, type, content - 'nacos_config' => [ - 'tenant' => 'tenant', // corresponding with service.namespaceId - 'data_id' => 'hyperf-service-config', - 'group' => 'DEFAULT_GROUP', - ], - 'nacos_config.data' => [ - 'data_id' => 'hyperf-service-config-yml', - 'group' => 'DEFAULT_GROUP', - 'type' => 'yml', - ], - ], - ], 'aliyun_acm' => [ 'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, 'interval' => 5, @@ -62,23 +27,5 @@ 'secret_key' => env('ALIYUN_ACM_SK', ''), 'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), ], - 'etcd' => [ - 'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, - 'packer' => Hyperf\Utils\Packer\JsonPacker::class, - 'namespaces' => [ - '/application', - ], - 'mapping' => [ - // etcd key => config key - '/application/test' => 'test', - ], - 'interval' => 5, - ], - 'zookeeper' => [ - 'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, - 'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), - 'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), - 'interval' => 5, - ], ], ]; diff --git a/installer/resources/config_center/config_apollo.php b/installer/resources/config_center/config_apollo.php index 3a6c6b23..289f1762 100644 --- a/installer/resources/config_center/config_apollo.php +++ b/installer/resources/config_center/config_apollo.php @@ -32,53 +32,5 @@ 'pullTimeout' => 10, 'interval_timeout' => 1, ], - 'nacos' => [ - 'driver' => Hyperf\ConfigNacos\NacosDriver::class, - 'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, - 'interval' => 3, - 'default_key' => 'nacos_config', - 'listener_config' => [ - // dataId, group, tenant, type, content - 'nacos_config' => [ - 'tenant' => 'tenant', // corresponding with service.namespaceId - 'data_id' => 'hyperf-service-config', - 'group' => 'DEFAULT_GROUP', - ], - 'nacos_config.data' => [ - 'data_id' => 'hyperf-service-config-yml', - 'group' => 'DEFAULT_GROUP', - 'type' => 'yml', - ], - ], - ], - 'aliyun_acm' => [ - 'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, - 'interval' => 5, - 'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'), - 'namespace' => env('ALIYUN_ACM_NAMESPACE', ''), - 'data_id' => env('ALIYUN_ACM_DATA_ID', ''), - 'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'), - 'access_key' => env('ALIYUN_ACM_AK', ''), - 'secret_key' => env('ALIYUN_ACM_SK', ''), - 'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), - ], - 'etcd' => [ - 'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, - 'packer' => Hyperf\Utils\Packer\JsonPacker::class, - 'namespaces' => [ - '/application', - ], - 'mapping' => [ - // etcd key => config key - '/application/test' => 'test', - ], - 'interval' => 5, - ], - 'zookeeper' => [ - 'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, - 'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), - 'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), - 'interval' => 5, - ], ], ]; diff --git a/installer/resources/config_center/config_etcd.php b/installer/resources/config_center/config_etcd.php index fcd02917..b35139f7 100644 --- a/installer/resources/config_center/config_etcd.php +++ b/installer/resources/config_center/config_etcd.php @@ -9,7 +9,6 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ -use Hyperf\ConfigApollo\PullMode; use Hyperf\ConfigCenter\Mode; return [ @@ -17,51 +16,6 @@ 'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'), 'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS), 'drivers' => [ - 'apollo' => [ - 'driver' => Hyperf\ConfigApollo\ApolloDriver::class, - 'pull_mode' => PullMode::INTERVAL, - 'server' => 'http://127.0.0.1:9080', - 'appid' => 'test', - 'cluster' => 'default', - 'namespaces' => [ - 'application', - ], - 'interval' => 5, - 'strict_mode' => false, - 'client_ip' => current(swoole_get_local_ip()), - 'pullTimeout' => 10, - 'interval_timeout' => 1, - ], - 'nacos' => [ - 'driver' => Hyperf\ConfigNacos\NacosDriver::class, - 'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, - 'interval' => 3, - 'default_key' => 'nacos_config', - 'listener_config' => [ - // dataId, group, tenant, type, content - 'nacos_config' => [ - 'tenant' => 'tenant', // corresponding with service.namespaceId - 'data_id' => 'hyperf-service-config', - 'group' => 'DEFAULT_GROUP', - ], - 'nacos_config.data' => [ - 'data_id' => 'hyperf-service-config-yml', - 'group' => 'DEFAULT_GROUP', - 'type' => 'yml', - ], - ], - ], - 'aliyun_acm' => [ - 'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, - 'interval' => 5, - 'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'), - 'namespace' => env('ALIYUN_ACM_NAMESPACE', ''), - 'data_id' => env('ALIYUN_ACM_DATA_ID', ''), - 'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'), - 'access_key' => env('ALIYUN_ACM_AK', ''), - 'secret_key' => env('ALIYUN_ACM_SK', ''), - 'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), - ], 'etcd' => [ 'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, 'packer' => Hyperf\Utils\Packer\JsonPacker::class, @@ -74,11 +28,5 @@ ], 'interval' => 5, ], - 'zookeeper' => [ - 'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, - 'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), - 'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), - 'interval' => 5, - ], ], ]; diff --git a/installer/resources/config_center/config_nacos.php b/installer/resources/config_center/config_nacos.php index 14cec7f1..ed4a1055 100644 --- a/installer/resources/config_center/config_nacos.php +++ b/installer/resources/config_center/config_nacos.php @@ -9,7 +9,6 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ -use Hyperf\ConfigApollo\PullMode; use Hyperf\ConfigCenter\Mode; return [ @@ -17,21 +16,6 @@ 'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'), 'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS), 'drivers' => [ - 'apollo' => [ - 'driver' => Hyperf\ConfigApollo\ApolloDriver::class, - 'pull_mode' => PullMode::INTERVAL, - 'server' => 'http://127.0.0.1:9080', - 'appid' => 'test', - 'cluster' => 'default', - 'namespaces' => [ - 'application', - ], - 'interval' => 5, - 'strict_mode' => false, - 'client_ip' => current(swoole_get_local_ip()), - 'pullTimeout' => 10, - 'interval_timeout' => 1, - ], 'nacos' => [ 'driver' => Hyperf\ConfigNacos\NacosDriver::class, 'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, @@ -51,34 +35,5 @@ ], ], ], - 'aliyun_acm' => [ - 'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, - 'interval' => 5, - 'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'), - 'namespace' => env('ALIYUN_ACM_NAMESPACE', ''), - 'data_id' => env('ALIYUN_ACM_DATA_ID', ''), - 'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'), - 'access_key' => env('ALIYUN_ACM_AK', ''), - 'secret_key' => env('ALIYUN_ACM_SK', ''), - 'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), - ], - 'etcd' => [ - 'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, - 'packer' => Hyperf\Utils\Packer\JsonPacker::class, - 'namespaces' => [ - '/application', - ], - 'mapping' => [ - // etcd key => config key - '/application/test' => 'test', - ], - 'interval' => 5, - ], - 'zookeeper' => [ - 'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, - 'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), - 'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), - 'interval' => 5, - ], ], ];