Skip to content

Commit 571ecf6

Browse files
committed
Merge branch 'master' into pr/132
2 parents ff29fb5 + d3a6b76 commit 571ecf6

28 files changed

Lines changed: 214 additions & 87 deletions

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# @contact group@hyperf.io
66
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
77

8-
FROM hyperf/hyperf:8.3-alpine-v3.19-swoole
8+
FROM hyperf/hyperf:8.4-alpine-v3.22-swoole
99
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT" app.name="Hyperf"
1010

1111
##

.github/workflows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# @contact group@hyperf.io
66
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
77

8-
FROM hyperf/hyperf:8.3-alpine-v3.19-swoole
8+
FROM hyperf/hyperf:8.4-alpine-v3.22-swoole
99
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT" app.name="Hyperf"
1010

1111
##

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# @contact group@hyperf.io
66
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
77

8-
FROM hyperf/hyperf:8.3-alpine-v3.19-swoole
8+
FROM hyperf/hyperf:8.4-alpine-v3.22-swoole
99
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT" app.name="Hyperf"
1010

1111
##

bin/hyperf.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env php
22
<?php
3+
4+
declare(strict_types=1);
35
/**
46
* This file is part of Hyperf.
57
*
@@ -8,6 +10,11 @@
810
* @contact group@hyperf.io
911
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1012
*/
13+
use Hyperf\Contract\ApplicationInterface;
14+
use Hyperf\Di\ClassLoader;
15+
use Hyperf\Engine\DefaultOption;
16+
use Psr\Container\ContainerInterface;
17+
1118
ini_set('display_errors', 'on');
1219
ini_set('display_startup_errors', 'on');
1320
ini_set('memory_limit', '1G');
@@ -18,14 +25,14 @@
1825

1926
require BASE_PATH . '/vendor/autoload.php';
2027

21-
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());
28+
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', DefaultOption::hookFlags());
2229

2330
// Self-called anonymous function that creates its own scope and keep the global namespace clean.
2431
(function () {
25-
Hyperf\Di\ClassLoader::init();
26-
/** @var Psr\Container\ContainerInterface $container */
32+
ClassLoader::init();
33+
/** @var ContainerInterface $container */
2734
$container = require BASE_PATH . '/config/container.php';
2835

29-
$application = $container->get(Hyperf\Contract\ApplicationInterface::class);
36+
$application = $container->get(ApplicationInterface::class);
3037
$application->run();
3138
})();

composer.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,27 @@
1212
"description": "A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.",
1313
"license": "Apache-2.0",
1414
"require": {
15-
"php": ">=8.1",
16-
"hyperf/cache": "~3.1.0",
17-
"hyperf/command": "~3.1.0",
18-
"hyperf/config": "~3.1.0",
19-
"hyperf/db-connection": "~3.1.0",
15+
"php": ">=8.2",
16+
"hyperf/cache": "~3.2.0",
17+
"hyperf/command": "~3.2.0",
18+
"hyperf/config": "~3.2.0",
19+
"hyperf/db-connection": "~3.2.0",
2020
"hyperf/engine": "^2.10",
21-
"hyperf/framework": "~3.1.0",
22-
"hyperf/guzzle": "~3.1.0",
23-
"hyperf/http-server": "~3.1.0",
24-
"hyperf/logger": "~3.1.0",
25-
"hyperf/memory": "~3.1.0",
26-
"hyperf/process": "~3.1.0"
21+
"hyperf/framework": "~3.2.0",
22+
"hyperf/guzzle": "~3.2.0",
23+
"hyperf/http-server": "~3.2.0",
24+
"hyperf/logger": "~3.2.0",
25+
"hyperf/memory": "~3.2.0",
26+
"hyperf/process": "~3.2.0",
27+
"hyperf/laminas-mime": "^3.0"
2728
},
2829
"require-dev": {
2930
"friendsofphp/php-cs-fixer": "^3.0",
30-
"hyperf/devtool": "~3.1.0",
31-
"hyperf/testing": "~3.1.0",
31+
"hyperf/devtool": "~3.2.0",
32+
"hyperf/testing": "~3.2.0",
3233
"mockery/mockery": "^1.0",
3334
"phpstan/phpstan": "^2.0",
34-
"swoole/ide-helper": "^5.0"
35+
"swoole/ide-helper": "^6.0"
3536
},
3637
"suggest": {
3738
"ext-openssl": "Required to use HTTPS.",

config/autoload/cache.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
use Hyperf\Cache\Driver\RedisDriver;
13+
use Hyperf\Codec\Packer\PhpSerializerPacker;
14+
1215
return [
1316
'default' => [
14-
'driver' => Hyperf\Cache\Driver\RedisDriver::class,
15-
'packer' => Hyperf\Codec\Packer\PhpSerializerPacker::class,
17+
'driver' => RedisDriver::class,
18+
'packer' => PhpSerializerPacker::class,
1619
'prefix' => 'c:',
1720
'skip_cache_results' => [],
1821
],

config/autoload/devtool.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
'generator' => [
1414
'amqp' => [
1515
'consumer' => [
16-
'namespace' => 'App\\Amqp\\Consumer',
16+
'namespace' => 'App\Amqp\Consumer',
1717
],
1818
'producer' => [
19-
'namespace' => 'App\\Amqp\\Producer',
19+
'namespace' => 'App\Amqp\Producer',
2020
],
2121
],
2222
'aspect' => [
23-
'namespace' => 'App\\Aspect',
23+
'namespace' => 'App\Aspect',
2424
],
2525
'command' => [
26-
'namespace' => 'App\\Command',
26+
'namespace' => 'App\Command',
2727
],
2828
'controller' => [
29-
'namespace' => 'App\\Controller',
29+
'namespace' => 'App\Controller',
3030
],
3131
'job' => [
32-
'namespace' => 'App\\Job',
32+
'namespace' => 'App\Job',
3333
],
3434
'listener' => [
35-
'namespace' => 'App\\Listener',
35+
'namespace' => 'App\Listener',
3636
],
3737
'middleware' => [
38-
'namespace' => 'App\\Middleware',
38+
'namespace' => 'App\Middleware',
3939
],
4040
'Process' => [
41-
'namespace' => 'App\\Processes',
41+
'namespace' => 'App\Processes',
4242
],
4343
],
4444
];

config/autoload/exceptions.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
use App\Exception\Handler\AppExceptionHandler;
13+
use Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler;
14+
1215
return [
1316
'handler' => [
1417
'http' => [
15-
Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class,
16-
App\Exception\Handler\AppExceptionHandler::class,
18+
HttpExceptionHandler::class,
19+
AppExceptionHandler::class,
1720
],
1821
],
1922
];

config/autoload/listeners.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
use Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler;
13+
1214
return [
13-
Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler::class,
15+
ErrorExceptionHandler::class,
1416
];

config/autoload/logger.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
use Monolog\Formatter\LineFormatter;
13+
use Monolog\Handler\StreamHandler;
14+
use Monolog\Logger;
15+
1216
return [
1317
'default' => [
1418
'handler' => [
15-
'class' => Monolog\Handler\StreamHandler::class,
19+
'class' => StreamHandler::class,
1620
'constructor' => [
1721
'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
18-
'level' => Monolog\Logger::DEBUG,
22+
'level' => Logger::DEBUG,
1923
],
2024
],
2125
'formatter' => [
22-
'class' => Monolog\Formatter\LineFormatter::class,
26+
'class' => LineFormatter::class,
2327
'constructor' => [
2428
'format' => null,
2529
'dateFormat' => 'Y-m-d H:i:s',

0 commit comments

Comments
 (0)