diff --git a/config/autoload/databases.php b/config/autoload/databases.php index 29a8fec..031e269 100644 --- a/config/autoload/databases.php +++ b/config/autoload/databases.php @@ -17,6 +17,8 @@ use Hyperf\Database\Commands\Ast\ModelRewriteSoftDeletesVisitor; use Hyperf\Database\Commands\Ast\ModelRewriteTimestampsVisitor; use Hyperf\Database\Commands\ModelOption; +use function Hyperf\Support\env; + return [ 'default' => [ 'driver' => env('DB_DRIVER', 'mysql'), diff --git a/installer/resources/amqp/amqp.php b/installer/resources/amqp/amqp.php old mode 100755 new mode 100644 index 934cf4b..ba1bf57 --- a/installer/resources/amqp/amqp.php +++ b/installer/resources/amqp/amqp.php @@ -9,6 +9,9 @@ declare(strict_types=1); * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + +use function Hyperf\Support\env; + return [ 'default' => [ 'host' => env('AMQP_HOST', 'localhost'), diff --git a/installer/resources/config_center/config_acm.php b/installer/resources/config_center/config_acm.php index e08c65f..147c76a 100755 --- a/installer/resources/config_center/config_acm.php +++ b/installer/resources/config_center/config_acm.php @@ -10,6 +10,7 @@ declare(strict_types=1); * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ use Hyperf\ConfigCenter\Mode; +use function Hyperf\Support\env; return [ 'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), diff --git a/installer/resources/config_center/config_apollo.php b/installer/resources/config_center/config_apollo.php index 289f176..5c64c04 100755 --- a/installer/resources/config_center/config_apollo.php +++ b/installer/resources/config_center/config_apollo.php @@ -12,6 +12,8 @@ declare(strict_types=1); use Hyperf\ConfigApollo\PullMode; use Hyperf\ConfigCenter\Mode; +use function Hyperf\Support\env; + return [ 'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), 'driver' => env('CONFIG_CENTER_DRIVER', 'apollo'), diff --git a/installer/resources/config_center/config_etcd.php b/installer/resources/config_center/config_etcd.php old mode 100755 new mode 100644 index b35139f..7be6a09 --- a/installer/resources/config_center/config_etcd.php +++ b/installer/resources/config_center/config_etcd.php @@ -11,6 +11,8 @@ declare(strict_types=1); */ use Hyperf\ConfigCenter\Mode; +use function Hyperf\Support\env; + return [ 'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), 'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'), @@ -18,7 +20,7 @@ return [ 'drivers' => [ 'etcd' => [ 'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, - 'packer' => Hyperf\Utils\Packer\JsonPacker::class, + 'packer' => Hyperf\Codec\Packer\JsonPacker::class, 'namespaces' => [ '/application', ], diff --git a/installer/resources/config_center/config_nacos.php b/installer/resources/config_center/config_nacos.php index ed4a105..3a18246 100755 --- a/installer/resources/config_center/config_nacos.php +++ b/installer/resources/config_center/config_nacos.php @@ -11,6 +11,8 @@ declare(strict_types=1); */ use Hyperf\ConfigCenter\Mode; +use function Hyperf\Support\env; + return [ 'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), 'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'), diff --git a/installer/resources/model_cache/databases.php b/installer/resources/model_cache/databases.php index b164103..ae6f9e7 100755 --- a/installer/resources/model_cache/databases.php +++ b/installer/resources/model_cache/databases.php @@ -9,6 +9,9 @@ declare(strict_types=1); * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + +use function Hyperf\Support\env; + return [ 'default' => [ 'driver' => env('DB_DRIVER', 'mysql'), diff --git a/installer/resources/tracer/opentracing.php b/installer/resources/tracer/opentracing.php index 8b4dbd1..44c2159 100755 --- a/installer/resources/tracer/opentracing.php +++ b/installer/resources/tracer/opentracing.php @@ -11,6 +11,8 @@ declare(strict_types=1); */ use Zipkin\Samplers\BinarySampler; +use function Hyperf\Support\env; + return [ 'default' => env('TRACER_DRIVER', 'zipkin'), 'enable' => [