mirror of
http://124.126.16.154:8888/singularity/hdk-skeleton.git
synced 2026-01-15 05:55:07 +08:00
feat(hyperf3): 将配置文件等的 env 方法迁移到 hyperf/support/env
Closes #7 Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
@@ -17,6 +17,8 @@ use Hyperf\Database\Commands\Ast\ModelRewriteSoftDeletesVisitor;
|
|||||||
use Hyperf\Database\Commands\Ast\ModelRewriteTimestampsVisitor;
|
use Hyperf\Database\Commands\Ast\ModelRewriteTimestampsVisitor;
|
||||||
use Hyperf\Database\Commands\ModelOption;
|
use Hyperf\Database\Commands\ModelOption;
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'default' => [
|
'default' => [
|
||||||
'driver' => env('DB_DRIVER', 'mysql'),
|
'driver' => env('DB_DRIVER', 'mysql'),
|
||||||
|
|||||||
3
installer/resources/amqp/amqp.php
Executable file → Normal file
3
installer/resources/amqp/amqp.php
Executable file → Normal file
@@ -9,6 +9,9 @@ declare(strict_types=1);
|
|||||||
* @contact group@hyperf.io
|
* @contact group@hyperf.io
|
||||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'default' => [
|
'default' => [
|
||||||
'host' => env('AMQP_HOST', 'localhost'),
|
'host' => env('AMQP_HOST', 'localhost'),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
|||||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||||
*/
|
*/
|
||||||
use Hyperf\ConfigCenter\Mode;
|
use Hyperf\ConfigCenter\Mode;
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ declare(strict_types=1);
|
|||||||
use Hyperf\ConfigApollo\PullMode;
|
use Hyperf\ConfigApollo\PullMode;
|
||||||
use Hyperf\ConfigCenter\Mode;
|
use Hyperf\ConfigCenter\Mode;
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
||||||
'driver' => env('CONFIG_CENTER_DRIVER', 'apollo'),
|
'driver' => env('CONFIG_CENTER_DRIVER', 'apollo'),
|
||||||
|
|||||||
4
installer/resources/config_center/config_etcd.php
Executable file → Normal file
4
installer/resources/config_center/config_etcd.php
Executable file → Normal file
@@ -11,6 +11,8 @@ declare(strict_types=1);
|
|||||||
*/
|
*/
|
||||||
use Hyperf\ConfigCenter\Mode;
|
use Hyperf\ConfigCenter\Mode;
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
||||||
'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'),
|
'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'),
|
||||||
@@ -18,7 +20,7 @@ return [
|
|||||||
'drivers' => [
|
'drivers' => [
|
||||||
'etcd' => [
|
'etcd' => [
|
||||||
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class,
|
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class,
|
||||||
'packer' => Hyperf\Utils\Packer\JsonPacker::class,
|
'packer' => Hyperf\Codec\Packer\JsonPacker::class,
|
||||||
'namespaces' => [
|
'namespaces' => [
|
||||||
'/application',
|
'/application',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ declare(strict_types=1);
|
|||||||
*/
|
*/
|
||||||
use Hyperf\ConfigCenter\Mode;
|
use Hyperf\ConfigCenter\Mode;
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
|
||||||
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'),
|
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'),
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ declare(strict_types=1);
|
|||||||
* @contact group@hyperf.io
|
* @contact group@hyperf.io
|
||||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'default' => [
|
'default' => [
|
||||||
'driver' => env('DB_DRIVER', 'mysql'),
|
'driver' => env('DB_DRIVER', 'mysql'),
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ declare(strict_types=1);
|
|||||||
*/
|
*/
|
||||||
use Zipkin\Samplers\BinarySampler;
|
use Zipkin\Samplers\BinarySampler;
|
||||||
|
|
||||||
|
use function Hyperf\Support\env;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'default' => env('TRACER_DRIVER', 'zipkin'),
|
'default' => env('TRACER_DRIVER', 'zipkin'),
|
||||||
'enable' => [
|
'enable' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user