Skip to content

Commit 3355a4c

Browse files
committed
Merge branch 'dev'
2 parents 4710867 + 7337ac7 commit 3355a4c

File tree

10 files changed

+102
-51
lines changed

10 files changed

+102
-51
lines changed

.github/workflows/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
77

8-
FROM hyperf/hyperf:8.0-alpine-v3.15-swoole
8+
FROM hyperf/hyperf:8.0-alpine-v3.16-swoole
99
LABEL maintainer="Hyperf Developers <[email protected]>" version="1.0" license="MIT" app.name="Hyperf"
1010

1111
##
@@ -25,7 +25,7 @@ RUN set -ex \
2525
&& php -m \
2626
&& php --ri swoole \
2727
# ---------- some config ----------
28-
&& cd /etc/php8 \
28+
&& cd /etc/php* \
2929
# - config PHP
3030
&& { \
3131
echo "upload_max_filesize=128M"; \

.phpstorm.meta.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?php
22

33
namespace PHPSTORM_META {
4-
54
// Reflect
6-
override(\Psr\Container\ContainerInterface::get(0), map('@'));
7-
override(\Hyperf\Utils\Context::get(0), map('@'));
8-
override(\make(0), map('@'));
9-
override(\di(0), map('@'));
10-
11-
}
5+
override(\Psr\Container\ContainerInterface::get(0), map(['' => '@']));
6+
override(\Hyperf\Context\Context::get(0), map(['' => '@']));
7+
override(\make(0), map(['' => '@']));
8+
override(\di(0), map(['' => '@']));
9+
}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
77

8-
FROM hyperf/hyperf:8.0-alpine-v3.15-swoole
8+
FROM hyperf/hyperf:8.0-alpine-v3.16-swoole
99
LABEL maintainer="Hyperf Developers <[email protected]>" version="1.0" license="MIT" app.name="Hyperf"
1010

1111
##
@@ -25,7 +25,7 @@ RUN set -ex \
2525
&& php -m \
2626
&& php --ri swoole \
2727
# ---------- some config ----------
28-
&& cd /etc/php8 \
28+
&& cd /etc/php* \
2929
# - config PHP
3030
&& { \
3131
echo "upload_max_filesize=128M"; \

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Hyperf
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
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.",

config/autoload/listeners.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
1212
return [
13+
Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler::class,
14+
Hyperf\Command\Listener\FailToHandleListener::class,
1315
];

config/container.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
use Hyperf\Di\Definition\DefinitionSourceFactory;
1717
use Hyperf\Utils\ApplicationContext;
1818

19-
$container = new Container((new DefinitionSourceFactory(true))());
19+
$container = new Container((new DefinitionSourceFactory())());
2020

21-
if (! $container instanceof \Psr\Container\ContainerInterface) {
22-
throw new RuntimeException('The dependency injection container is invalid.');
23-
}
2421
return ApplicationContext::setContainer($container);

deploy.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
- "APP_PROJECT=hyperf"
77
- "APP_ENV=test"
88
ports:
9-
- 9501:9501
9+
- "9501:9501"
1010
deploy:
1111
replicas: 1
1212
restart_policy:

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)