Skip to content

Commit 0f407d0

Browse files
committed
Upgrade hyperf components to 3.0
1 parent c410683 commit 0f407d0

File tree

3 files changed

+68
-35
lines changed

3 files changed

+68
-35
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
/**
5+
* This file is part of Hyperf.
6+
*
7+
* @link https://www.hyperf.io
8+
* @document https://hyperf.wiki
9+
* @contact [email protected]
10+
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
11+
*/
12+
namespace App\Listener;
13+
14+
use Hyperf\Command\Event\AfterExecute;
15+
use Hyperf\Coordinator\Constants;
16+
use Hyperf\Coordinator\CoordinatorManager;
17+
use Hyperf\Event\Annotation\Listener;
18+
use Hyperf\Event\Contract\ListenerInterface;
19+
20+
#[Listener]
21+
class ResumeExitCoordinatorListener implements ListenerInterface
22+
{
23+
public function listen(): array
24+
{
25+
return [
26+
AfterExecute::class,
27+
];
28+
}
29+
30+
public function process(object $event): void
31+
{
32+
CoordinatorManager::until(Constants::WORKER_EXIT)->resume();
33+
}
34+
}

composer.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,24 @@
1313
"license": "Apache-2.0",
1414
"require": {
1515
"php": ">=8.0",
16-
"hyperf/cache": "~2.2.0",
17-
"hyperf/command": "~2.2.0",
18-
"hyperf/config": "~2.2.0",
19-
"hyperf/db-connection": "~2.2.0",
20-
"hyperf/framework": "~2.2.0",
21-
"hyperf/guzzle": "~2.2.0",
22-
"hyperf/http-server": "~2.2.0",
23-
"hyperf/logger": "~2.2.0",
24-
"hyperf/memory": "~2.2.0",
25-
"hyperf/process": "~2.2.0"
16+
"hyperf/cache": "~3.0.0",
17+
"hyperf/command": "~3.0.0",
18+
"hyperf/config": "~3.0.0",
19+
"hyperf/db-connection": "~3.0.0",
20+
"hyperf/framework": "~3.0.0",
21+
"hyperf/guzzle": "~3.0.0",
22+
"hyperf/http-server": "~3.0.0",
23+
"hyperf/logger": "~3.0.0",
24+
"hyperf/memory": "~3.0.0",
25+
"hyperf/process": "~3.0.0"
2626
},
2727
"require-dev": {
2828
"friendsofphp/php-cs-fixer": "^3.0",
29-
"hyperf/devtool": "~2.2.0",
30-
"hyperf/ide-helper": "~2.2.0",
31-
"hyperf/testing": "~2.2.0",
29+
"hyperf/devtool": "~3.0.0",
30+
"hyperf/testing": "~3.0.0",
3231
"mockery/mockery": "^1.0",
33-
"phpstan/phpstan": "^0.12",
34-
"swoole/ide-helper": "^4.5"
32+
"phpstan/phpstan": "^1.0",
33+
"swoole/ide-helper": "^5.0"
3534
},
3635
"suggest": {
3736
"ext-openssl": "Required to use HTTPS.",

installer/config.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,64 +12,64 @@
1212
return [
1313
'packages' => [
1414
'hyperf/amqp' => [
15-
'version' => '~2.2.0',
15+
'version' => '~3.0.0',
1616
],
1717
'hyperf/async-queue' => [
18-
'version' => '~2.2.0',
18+
'version' => '~3.0.0',
1919
],
2020
'hyperf/database' => [
21-
'version' => '~2.2.0',
21+
'version' => '~3.0.0',
2222
],
2323
'hyperf/db-connection' => [
24-
'version' => '~2.2.0',
24+
'version' => '~3.0.0',
2525
],
2626
'hyperf/model-cache' => [
27-
'version' => '~2.2.0',
27+
'version' => '~3.0.0',
2828
],
2929
'hyperf/constants' => [
30-
'version' => '~2.2.0',
30+
'version' => '~3.0.0',
3131
],
3232
'hyperf/json-rpc' => [
33-
'version' => '~2.2.0',
33+
'version' => '~3.0.0',
3434
],
3535
'hyperf/redis' => [
36-
'version' => '~2.2.0',
36+
'version' => '~3.0.0',
3737
],
3838
'hyperf/rpc' => [
39-
'version' => '~2.2.0',
39+
'version' => '~3.0.0',
4040
],
4141
'hyperf/rpc-client' => [
42-
'version' => '~2.2.0',
42+
'version' => '~3.0.0',
4343
],
4444
'hyperf/rpc-server' => [
45-
'version' => '~2.2.0',
45+
'version' => '~3.0.0',
4646
],
4747
'hyperf/grpc-client' => [
48-
'version' => '~2.2.0',
48+
'version' => '~3.0.0',
4949
],
5050
'hyperf/grpc-server' => [
51-
'version' => '~2.2.0',
51+
'version' => '~3.0.0',
5252
],
5353
'hyperf/elasticsearch' => [
54-
'version' => '~2.2.0',
54+
'version' => '~3.0.0',
5555
],
5656
'hyperf/config-apollo' => [
57-
'version' => '~2.2.0',
57+
'version' => '~3.0.0',
5858
],
5959
'hyperf/config-aliyun-acm' => [
60-
'version' => '~2.2.0',
60+
'version' => '~3.0.0',
6161
],
6262
'hyperf/config-etcd' => [
63-
'version' => '~2.2.0',
63+
'version' => '~3.0.0',
6464
],
6565
'hyperf/config-nacos' => [
66-
'version' => '~2.2.0',
66+
'version' => '~3.0.0',
6767
],
6868
'hyperf/tracer' => [
69-
'version' => '~2.2.0',
69+
'version' => '~3.0.0',
7070
],
7171
'hyperf/service-governance' => [
72-
'version' => '~2.2.0',
72+
'version' => '~3.0.0',
7373
],
7474
],
7575
'require-dev' => [

0 commit comments

Comments
 (0)