Skip to content

Commit df60074

Browse files
committed
Upgrade 1.1
1 parent feca149 commit df60074

File tree

5 files changed

+41
-50
lines changed

5 files changed

+41
-50
lines changed

bin/hyperf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
date_default_timezone_set('Asia/Shanghai');
99

1010
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
11+
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
1112

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

composer.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@
1414
"require": {
1515
"php": ">=7.2",
1616
"ext-swoole": ">=4.2",
17-
"hyperf/cache": "~1.0.0",
18-
"hyperf/command": "~1.0.0",
19-
"hyperf/config": "~1.0.0",
20-
"hyperf/contract": "~1.0.0",
21-
"hyperf/database": "~1.0.0",
22-
"hyperf/db-connection": "~1.0.0",
23-
"hyperf/devtool": "~1.0.0",
24-
"hyperf/di": "~1.0.0",
25-
"hyperf/dispatcher": "~1.0.0",
26-
"hyperf/event": "~1.0.0",
27-
"hyperf/exception-handler": "~1.0.0",
28-
"hyperf/framework": "~1.0.0",
29-
"hyperf/guzzle": "~1.0.0",
30-
"hyperf/http-server": "~1.0.0",
31-
"hyperf/logger": "~1.0.0",
32-
"hyperf/memory": "~1.0.0",
33-
"hyperf/paginator": "~1.0.0",
34-
"hyperf/pool": "~1.0.0",
35-
"hyperf/process": "~1.0.0",
36-
"hyperf/redis": "~1.0.0",
37-
"hyperf/utils": "~1.0.0"
17+
"hyperf/cache": "~1.1.0",
18+
"hyperf/command": "~1.1.0",
19+
"hyperf/config": "~1.1.0",
20+
"hyperf/contract": "~1.1.0",
21+
"hyperf/database": "~1.1.0",
22+
"hyperf/db-connection": "~1.1.0",
23+
"hyperf/devtool": "~1.1.0",
24+
"hyperf/di": "~1.1.0",
25+
"hyperf/dispatcher": "~1.1.0",
26+
"hyperf/event": "~1.1.0",
27+
"hyperf/exception-handler": "~1.1.0",
28+
"hyperf/framework": "~1.1.0",
29+
"hyperf/guzzle": "~1.1.0",
30+
"hyperf/http-server": "~1.1.0",
31+
"hyperf/logger": "~1.1.0",
32+
"hyperf/memory": "~1.1.0",
33+
"hyperf/paginator": "~1.1.0",
34+
"hyperf/pool": "~1.1.0",
35+
"hyperf/process": "~1.1.0",
36+
"hyperf/redis": "~1.1.0",
37+
"hyperf/utils": "~1.1.0"
3838
},
3939
"require-dev": {
4040
"swoft/swoole-ide-helper": "^4.2",
@@ -43,7 +43,7 @@
4343
"mockery/mockery": "^1.0",
4444
"doctrine/common": "^2.9",
4545
"phpstan/phpstan": "^0.11.2",
46-
"hyperf/testing": "~1.0.0"
46+
"hyperf/testing": "~1.1.0"
4747
},
4848
"suggest": {
4949
"ext-openssl": "Required to use HTTPS.",

config/container.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,11 @@
1313
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
1414
*/
1515

16-
use Hyperf\Config\ProviderConfig;
17-
use Hyperf\Di\Annotation\Scanner;
1816
use Hyperf\Di\Container;
19-
use Hyperf\Di\Definition\DefinitionSource;
17+
use Hyperf\Di\Definition\DefinitionSourceFactory;
2018
use Hyperf\Utils\ApplicationContext;
2119

22-
$configFromProviders = ProviderConfig::load();
23-
$definitions = include __DIR__ . '/dependencies.php';
24-
$serverDependencies = array_replace($configFromProviders['dependencies'] ?? [], $definitions['dependencies'] ?? []);
25-
26-
$annotations = include __DIR__ . '/autoload/annotations.php';
27-
$scanDirs = $configFromProviders['scan']['paths'];
28-
$scanDirs = array_merge($scanDirs, $annotations['scan']['paths'] ?? []);
29-
30-
$ignoreAnnotations = $annotations['scan']['ignore_annotations'] ?? ['mixin'];
31-
$container = new Container(new DefinitionSource($serverDependencies, $scanDirs, new Scanner($ignoreAnnotations)));
20+
$container = new Container((new DefinitionSourceFactory(true))());
3221

3322
if (! $container instanceof \Psr\Container\ContainerInterface) {
3423
throw new RuntimeException('The dependency injection container is invalid.');

installer/config.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,49 @@
1313
return [
1414
'packages' => [
1515
'hyperf/amqp' => [
16-
'version' => '~1.0.0',
16+
'version' => '~1.1.0',
1717
],
1818
'hyperf/async-queue' => [
19-
'version' => '~1.0.0',
19+
'version' => '~1.1.0',
2020
],
2121
'hyperf/model-cache' => [
22-
'version' => '~1.0.0',
22+
'version' => '~1.1.0',
2323
],
2424
'hyperf/constants' => [
25-
'version' => '~1.0.0',
25+
'version' => '~1.1.0',
2626
],
2727
'hyperf/json-rpc' => [
28-
'version' => '~1.0.0',
28+
'version' => '~1.1.0',
2929
],
3030
'hyperf/rpc' => [
31-
'version' => '~1.0.0',
31+
'version' => '~1.1.0',
3232
],
3333
'hyperf/rpc-client' => [
34-
'version' => '~1.0.0',
34+
'version' => '~1.1.0',
3535
],
3636
'hyperf/rpc-server' => [
37-
'version' => '~1.0.0',
37+
'version' => '~1.1.0',
3838
],
3939
'hyperf/grpc-client' => [
40-
'version' => '~1.0.0',
40+
'version' => '~1.1.0',
4141
],
4242
'hyperf/grpc-server' => [
43-
'version' => '~1.0.0',
43+
'version' => '~1.1.0',
4444
],
4545
'hyperf/elasticsearch' => [
46-
'version' => '~1.0.0',
46+
'version' => '~1.1.0',
4747
],
4848
'hyperf/config-apollo' => [
49-
'version' => '~1.0.0',
49+
'version' => '~1.1.0',
5050
],
5151
'hyperf/config-aliyun-acm' => [
52-
'version' => '~1.0.0',
52+
'version' => '~1.1.0',
5353
],
5454
'hyperf/tracer' => [
55-
'version' => '~1.0.0',
55+
'version' => '~1.1.0',
5656
],
5757
'hyperf/service-governance' => [
58-
'version' => '~1.0.0',
58+
'version' => '~1.1.0',
5959
],
6060
],
6161
'require-dev' => [

test/bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
date_default_timezone_set('Asia/Shanghai');
1818

1919
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
20+
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
2021

2122
Swoole\Runtime::enableCoroutine(true);
2223

0 commit comments

Comments
 (0)