From d0ca1b0209096d79dab9e5d0a79f3573c61cacfe Mon Sep 17 00:00:00 2001 From: daydaygo <1252409767@qq.com> Date: Mon, 22 Jun 2020 10:57:21 +0800 Subject: [PATCH] feat: update hyperf 2.0 --- .env.example | 1 + composer.json | 6 ++---- config/autoload/logger.php | 2 +- test/bootstrap.php | 2 ++ 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 41be784e..68795836 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ APP_NAME=skeleton +APP_ENV=dev DB_DRIVER=mysql DB_HOST=localhost diff --git a/composer.json b/composer.json index e0e3e180..e135a411 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,7 @@ "hyperf/redis": "~2.0.0" }, "require-dev": { - "swoole/ide-helper": "^4.4", - "phpmd/phpmd": "^2.6", + "swoole/ide-helper": "^4.5", "friendsofphp/php-cs-fixer": "^2.14", "mockery/mockery": "^1.0", "doctrine/common": "^2.9", @@ -72,7 +71,6 @@ "test": "co-phpunit -c phpunit.xml --colors=always", "cs-fix": "php-cs-fixer fix $1", "analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config", - "start": "php ./bin/hyperf.php start", - "init-proxy": "init-proxy.sh" + "start": "php ./bin/hyperf.php start" } } diff --git a/config/autoload/logger.php b/config/autoload/logger.php index 332145b9..6f2483ee 100644 --- a/config/autoload/logger.php +++ b/config/autoload/logger.php @@ -22,7 +22,7 @@ 'class' => Monolog\Formatter\LineFormatter::class, 'constructor' => [ 'format' => null, - 'dateFormat' => null, + 'dateFormat' => 'Y-m-d H:i:s', 'allowInlineLineBreaks' => true, ], ], diff --git a/test/bootstrap.php b/test/bootstrap.php index 012bd429..746bf0e1 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -22,6 +22,8 @@ require BASE_PATH . '/vendor/autoload.php'; +\Hyperf\Di\ClassLoader::init(); + $container = require BASE_PATH . '/config/container.php'; $container->get(Hyperf\Contract\ApplicationInterface::class);