Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 3.1 #105

Merged
merged 6 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .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.16-swoole
FROM hyperf/hyperf:8.1-alpine-v3.18-swoole
LABEL maintainer="Hyperf Developers <[email protected]>" version="1.0" license="MIT" app.name="Hyperf"

##
Expand Down
2 changes: 1 addition & 1 deletion 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.1-alpine-v3.18-swoole-v5.0
FROM hyperf/hyperf:8.1-alpine-v3.18-swoole
LABEL maintainer="Hyperf Developers <[email protected]>" version="1.0" license="MIT" app.name="Hyperf"

##
Expand Down
1 change: 1 addition & 0 deletions app/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Controller;

use Hyperf\Di\Annotation\Inject;
Expand Down
1 change: 1 addition & 0 deletions app/Controller/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Controller;

class IndexController extends AbstractController
Expand Down
1 change: 1 addition & 0 deletions app/Exception/Handler/AppExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Exception\Handler;

use Hyperf\Contract\StdoutLoggerInterface;
Expand Down
1 change: 1 addition & 0 deletions app/Listener/DbQueryExecutedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Listener;

use Hyperf\Collection\Arr;
Expand Down
1 change: 1 addition & 0 deletions app/Listener/ResumeExitCoordinatorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Listener;

use Hyperf\Command\Event\AfterExecute;
Expand Down
1 change: 1 addition & 0 deletions app/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Model;

use Hyperf\DbConnection\Model\Model as BaseModel;
Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
"description": "A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.",
"license": "Apache-2.0",
"require": {
"php": ">=8.0",
"hyperf/cache": "~3.0.0",
"hyperf/command": "~3.0.0",
"hyperf/config": "~3.0.0",
"hyperf/db-connection": "~3.0.0",
"php": ">=8.1",
"hyperf/cache": "~3.1.0",
"hyperf/command": "~3.1.0",
"hyperf/config": "~3.1.0",
"hyperf/db-connection": "~3.1.0",
"hyperf/engine": "^2.10",
"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"
"hyperf/framework": "~3.1.0",
"hyperf/guzzle": "~3.1.0",
"hyperf/http-server": "~3.1.0",
"hyperf/logger": "~3.1.0",
"hyperf/memory": "~3.1.0",
"hyperf/process": "~3.1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"hyperf/devtool": "~3.0.0",
"hyperf/testing": "~3.0.0",
"hyperf/devtool": "~3.1.0",
"hyperf/testing": "~3.1.0",
"mockery/mockery": "^1.0",
"phpstan/phpstan": "^1.0",
"swoole/ide-helper": "^5.0"
Expand Down
1 change: 1 addition & 0 deletions installer/OptionalPackages.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Installer;

use Composer\Composer;
Expand Down
1 change: 1 addition & 0 deletions installer/Script.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Installer;

use Composer\Script\Event;
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' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/async-queue' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/database' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/db-connection' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/model-cache' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/constants' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/json-rpc' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/redis' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/rpc' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/rpc-client' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/rpc-server' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/grpc-client' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/grpc-server' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/elasticsearch' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/config-apollo' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/config-aliyun-acm' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/config-etcd' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/config-nacos' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/tracer' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
'hyperf/service-governance' => [
'version' => '~3.0.0',
'version' => '~3.1.0',
],
],
'require-dev' => [
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/amqp/amqp.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use function Hyperf\Support\env;

return [
'default' => [
'host' => env('AMQP_HOST', 'localhost'),
Expand Down
1 change: 1 addition & 0 deletions installer/resources/async_queue/AsyncQueueConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Process;

use Hyperf\AsyncQueue\Process\ConsumerProcess;
Expand Down
1 change: 1 addition & 0 deletions installer/resources/async_queue/QueueHandleListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Listener;

use Hyperf\AsyncQueue\AnnotationJob;
Expand Down
2 changes: 1 addition & 1 deletion installer/resources/async_queue/async_queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
return [
'default' => [
'driver' => Hyperf\AsyncQueue\Driver\RedisDriver::class,
'driver' => \Hyperf\AsyncQueue\Driver\RedisDriver::class,
'redis' => [
'pool' => 'default',
],
Expand Down
2 changes: 1 addition & 1 deletion installer/resources/bin/hyperf.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ error_reporting(E_ALL);
date_default_timezone_set('%TIME_ZONE%');

! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());

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

Expand Down
2 changes: 2 additions & 0 deletions installer/resources/config_center/config_acm.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/
use Hyperf\ConfigCenter\Mode;

use function Hyperf\Support\env;

return [
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
'driver' => env('CONFIG_CENTER_DRIVER', 'aliyun_acm'),
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/config_center/config_apollo.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
use Hyperf\ConfigApollo\PullMode;
use Hyperf\ConfigCenter\Mode;

use function Hyperf\Support\env;

return [
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
'driver' => env('CONFIG_CENTER_DRIVER', 'apollo'),
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/config_center/config_etcd.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/
use Hyperf\ConfigCenter\Mode;

use function Hyperf\Support\env;

return [
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'),
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/config_center/config_nacos.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/
use Hyperf\ConfigCenter\Mode;

use function Hyperf\Support\env;

return [
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'),
Expand Down
1 change: 1 addition & 0 deletions installer/resources/constants/BusinessException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Exception;

use App\Constants\ErrorCode;
Expand Down
1 change: 1 addition & 0 deletions installer/resources/constants/ErrorCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/database/databases.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use function Hyperf\Support\env;

return [
'default' => [
'driver' => env('DB_DRIVER', 'mysql'),
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/database/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use function Hyperf\Support\env;

return [
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
Expand Down
1 change: 1 addition & 0 deletions installer/resources/model_cache/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace App\Model;

use Hyperf\DbConnection\Model\Model as BaseModel;
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/model_cache/databases.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use function Hyperf\Support\env;

return [
'default' => [
'driver' => env('DB_DRIVER', 'mysql'),
Expand Down
2 changes: 2 additions & 0 deletions installer/resources/tracer/opentracing.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/
use Zipkin\Samplers\BinarySampler;

use function Hyperf\Support\env;

return [
'default' => env('TRACER_DRIVER', 'zipkin'),
'enable' => [
Expand Down
1 change: 1 addition & 0 deletions test/Cases/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\Cases;

use Hyperf\Testing\TestCase;
Expand Down
1 change: 1 addition & 0 deletions test/HttpTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest;

use Hyperf\Testing\Client;
Expand Down
Loading