Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Aug 18, 2022
2 parents 4710867 + 7337ac7 commit 3355a4c
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @contact [email protected]
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE

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

##
Expand All @@ -25,7 +25,7 @@ RUN set -ex \
&& php -m \
&& php --ri swoole \
# ---------- some config ----------
&& cd /etc/php8 \
&& cd /etc/php* \
# - config PHP
&& { \
echo "upload_max_filesize=128M"; \
Expand Down
12 changes: 5 additions & 7 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?php

namespace PHPSTORM_META {

// Reflect
override(\Psr\Container\ContainerInterface::get(0), map('@'));
override(\Hyperf\Utils\Context::get(0), map('@'));
override(\make(0), map('@'));
override(\di(0), map('@'));

}
override(\Psr\Container\ContainerInterface::get(0), map(['' => '@']));
override(\Hyperf\Context\Context::get(0), map(['' => '@']));
override(\make(0), map(['' => '@']));
override(\di(0), map(['' => '@']));
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @contact [email protected]
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE

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

##
Expand All @@ -25,7 +25,7 @@ RUN set -ex \
&& php -m \
&& php --ri swoole \
# ---------- some config ----------
&& cd /etc/php8 \
&& cd /etc/php* \
# - config PHP
&& { \
echo "upload_max_filesize=128M"; \
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Hyperf

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions app/Listener/ResumeExitCoordinatorListener.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace App\Listener;

use Hyperf\Command\Event\AfterExecute;
use Hyperf\Coordinator\Constants;
use Hyperf\Coordinator\CoordinatorManager;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;

#[Listener]
class ResumeExitCoordinatorListener implements ListenerInterface
{
public function listen(): array
{
return [
AfterExecute::class,
];
}

public function process(object $event): void
{
CoordinatorManager::until(Constants::WORKER_EXIT)->resume();
}
}
29 changes: 14 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,24 @@
"license": "Apache-2.0",
"require": {
"php": ">=8.0",
"hyperf/cache": "~2.2.0",
"hyperf/command": "~2.2.0",
"hyperf/config": "~2.2.0",
"hyperf/db-connection": "~2.2.0",
"hyperf/framework": "~2.2.0",
"hyperf/guzzle": "~2.2.0",
"hyperf/http-server": "~2.2.0",
"hyperf/logger": "~2.2.0",
"hyperf/memory": "~2.2.0",
"hyperf/process": "~2.2.0"
"hyperf/cache": "~3.0.0",
"hyperf/command": "~3.0.0",
"hyperf/config": "~3.0.0",
"hyperf/db-connection": "~3.0.0",
"hyperf/framework": "~3.0.0",
"hyperf/guzzle": "~3.0.0",
"hyperf/http-server": "~3.0.0",
"hyperf/logger": "~3.0.0",
"hyperf/memory": "~3.0.0",
"hyperf/process": "~3.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"hyperf/devtool": "~2.2.0",
"hyperf/ide-helper": "~2.2.0",
"hyperf/testing": "~2.2.0",
"hyperf/devtool": "~3.0.0",
"hyperf/testing": "~3.0.0",
"mockery/mockery": "^1.0",
"phpstan/phpstan": "^0.12",
"swoole/ide-helper": "^4.5"
"phpstan/phpstan": "^1.0",
"swoole/ide-helper": "^5.0"
},
"suggest": {
"ext-openssl": "Required to use HTTPS.",
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/listeners.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
return [
Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler::class,
Hyperf\Command\Listener\FailToHandleListener::class,
];
5 changes: 1 addition & 4 deletions config/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
use Hyperf\Di\Definition\DefinitionSourceFactory;
use Hyperf\Utils\ApplicationContext;

$container = new Container((new DefinitionSourceFactory(true))());
$container = new Container((new DefinitionSourceFactory())());

if (! $container instanceof \Psr\Container\ContainerInterface) {
throw new RuntimeException('The dependency injection container is invalid.');
}
return ApplicationContext::setContainer($container);
2 changes: 1 addition & 1 deletion deploy.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- "APP_PROJECT=hyperf"
- "APP_ENV=test"
ports:
- 9501:9501
- "9501:9501"
deploy:
replicas: 1
restart_policy:
Expand Down
40 changes: 20 additions & 20 deletions installer/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,64 +12,64 @@
return [
'packages' => [
'hyperf/amqp' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/async-queue' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/database' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/db-connection' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/model-cache' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/constants' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/json-rpc' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/redis' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/rpc' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/rpc-client' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/rpc-server' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/grpc-client' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/grpc-server' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/elasticsearch' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/config-apollo' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/config-aliyun-acm' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/config-etcd' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/config-nacos' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/tracer' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
'hyperf/service-governance' => [
'version' => '~2.2.0',
'version' => '~3.0.0',
],
],
'require-dev' => [
Expand Down

0 comments on commit 3355a4c

Please sign in to comment.