h888
Wayne 3 years ago
parent 9cb6dfd4d8
commit a4b53deb87

@ -9,15 +9,6 @@ return [
'HttpEnd' => [],
'LogLevel' => [],
'LogWrite' => [],
'swoole.websocket.Connect' => [
\app\listener\WsConnect::class
],
'swoole.websocket.Close' => [
\app\listener\WsClose::class
],
'swoole.websocket.Test' => [
\app\listener\WsTest::class
],
],
'subscribe' => [],

@ -31,8 +31,7 @@
"firebase/php-jwt": "^6.3",
"paragonie/sodium_compat": "^1.19",
"topthink/think-filesystem": "^2.0",
"ecpay/sdk": "^1.2",
"topthink/think-swoole": "^4.0"
"ecpay/sdk": "^1.2"
},
"require-dev": {
"symfony/var-dumper": "^4.2",

575
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "0062897fc4bb61be5d05fa74ea448d25",
"content-hash": "43f0f90b248a23d2f06795c69b2503f2",
"packages": [
{
"name": "aferrandini/phpqrcode",
@ -725,214 +725,6 @@
],
"time": "2022-04-17T13:12:02+00:00"
},
{
"name": "nette/php-generator",
"version": "v3.6.9",
"source": {
"type": "git",
"url": "https://github.com/nette/php-generator.git",
"reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/php-generator/zipball/d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6",
"reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6",
"shasum": ""
},
"require": {
"nette/utils": "^3.1.2",
"php": ">=7.2 <8.3"
},
"require-dev": {
"nette/tester": "^2.4",
"nikic/php-parser": "^4.13",
"phpstan/phpstan": "^0.12",
"tracy/tracy": "^2.8"
},
"suggest": {
"nikic/php-parser": "to use ClassType::withBodiesFrom() & GlobalFunction::withBodyFrom()"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.6-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.1 features.",
"homepage": "https://nette.org",
"keywords": [
"code",
"nette",
"php",
"scaffolding"
],
"support": {
"issues": "https://github.com/nette/php-generator/issues",
"source": "https://github.com/nette/php-generator/tree/v3.6.9"
},
"time": "2022-10-04T11:49:47+00:00"
},
{
"name": "nette/utils",
"version": "v3.2.9",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c",
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c",
"shasum": ""
},
"require": {
"php": ">=7.2 <8.3"
},
"conflict": {
"nette/di": "<3.0.6"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "dev-master",
"nette/tester": "~2.0",
"phpstan/phpstan": "^1.0",
"tracy/tracy": "^2.3"
},
"suggest": {
"ext-gd": "to use Image",
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
"ext-json": "to use Nette\\Utils\\Json",
"ext-mbstring": "to use Strings::lower() etc...",
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()",
"ext-xml": "to use Strings::length() etc. when mbstring is not available"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
"homepage": "https://nette.org",
"keywords": [
"array",
"core",
"datetime",
"images",
"json",
"nette",
"paginator",
"password",
"slugify",
"string",
"unicode",
"utf-8",
"utility",
"validation"
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v3.2.9"
},
"time": "2023-01-18T03:26:20+00:00"
},
{
"name": "open-smf/connection-pool",
"version": "v1.0.16",
"source": {
"type": "git",
"url": "https://github.com/open-smf/connection-pool.git",
"reference": "f70e47dbf56f1869d3207e15825cf38810b865e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/open-smf/connection-pool/zipball/f70e47dbf56f1869d3207e15825cf38810b865e0",
"reference": "f70e47dbf56f1869d3207e15825cf38810b865e0",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-swoole": ">=4.2.9",
"php": ">=7.0.0"
},
"require-dev": {
"swoole/ide-helper": "@dev"
},
"suggest": {
"ext-redis": "A PHP extension for Redis."
},
"type": "library",
"autoload": {
"psr-4": {
"Smf\\ConnectionPool\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Xie Biao",
"email": "hhxsv5@sina.com"
}
],
"description": "A common connection pool based on Swoole is usually used as the database connection pool.",
"homepage": "https://github.com/open-smf/connection-pool",
"keywords": [
"connection-pool",
"database-connection-pool",
"swoole"
],
"support": {
"issues": "https://github.com/open-smf/connection-pool/issues",
"source": "https://github.com/open-smf/connection-pool"
},
"time": "2021-03-01T04:13:24+00:00"
},
{
"name": "paragonie/random_compat",
"version": "v9.99.100",
@ -1480,81 +1272,6 @@
},
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "stechstudio/backoff",
"version": "1.2",
"source": {
"type": "git",
"url": "https://github.com/stechstudio/backoff.git",
"reference": "816e46107a6be2e1072ba0ff2cb26034872dfa49"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stechstudio/backoff/zipball/816e46107a6be2e1072ba0ff2cb26034872dfa49",
"reference": "816e46107a6be2e1072ba0ff2cb26034872dfa49",
"shasum": ""
},
"require-dev": {
"phpunit/phpunit": "5.5.*"
},
"type": "library",
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"STS\\Backoff\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Joseph Szobody",
"email": "joseph@stechstudio.com"
}
],
"description": "PHP library providing retry functionality with multiple backoff strategies and jitter support",
"support": {
"issues": "https://github.com/stechstudio/backoff/issues",
"source": "https://github.com/stechstudio/backoff/tree/1.2"
},
"time": "2020-12-26T14:57:10+00:00"
},
{
"name": "swoole/ide-helper",
"version": "4.8.13",
"source": {
"type": "git",
"url": "https://github.com/swoole/ide-helper.git",
"reference": "d100c446b2e3d56430cbcab5dc3fa20a9f35c4ef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swoole/ide-helper/zipball/d100c446b2e3d56430cbcab5dc3fa20a9f35c4ef",
"reference": "d100c446b2e3d56430cbcab5dc3fa20a9f35c4ef",
"shasum": ""
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Team Swoole",
"email": "team@swoole.com"
}
],
"description": "IDE help files for Swoole.",
"support": {
"issues": "https://github.com/swoole/ide-helper/issues",
"source": "https://github.com/swoole/ide-helper/tree/4.8.13"
},
"time": "2023-03-20T06:46:24+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.5.2",
@ -1622,152 +1339,6 @@
],
"time": "2022-01-02T09:53:40+00:00"
},
{
"name": "symfony/finder",
"version": "v5.4.21",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
"reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Finder\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.4.21"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-02-16T09:33:00+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "thans/tp-jwt-auth",
"version": "v1.3.1",
@ -2082,99 +1653,109 @@
"source": "https://github.com/top-think/think-orm/tree/v2.0.61"
},
"time": "2023-04-20T14:27:51+00:00"
},
}
],
"packages-dev": [
{
"name": "topthink/think-swoole",
"version": "v4.0.9",
"name": "symfony/polyfill-mbstring",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-swoole.git",
"reference": "edc326d92fc738c290d5777f0c544477759fa7f3"
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-swoole/zipball/edc326d92fc738c290d5777f0c544477759fa7f3",
"reference": "edc326d92fc738c290d5777f0c544477759fa7f3",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-swoole": ">=4.6",
"nette/php-generator": "^3.2",
"open-smf/connection-pool": "~1.0",
"php": ">=7.4",
"stechstudio/backoff": "^1.2",
"swoole/ide-helper": "^4.3",
"symfony/finder": "^4.3.2|^5.1",
"topthink/framework": "^6.0"
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/var-dumper": "^4.3|^5.1",
"topthink/think-queue": "^3.0",
"topthink/think-tracing": "^1.0"
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"think": {
"services": [
"think\\swoole\\Service"
],
"config": {
"swoole": "src/config/swoole.php"
}
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"src/helpers.php"
"bootstrap.php"
],
"psr-4": {
"think\\swoole\\": "src"
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
"MIT"
],
"authors": [
{
"name": "liu21st",
"email": "liu21st@gmail.com"
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Swoole extend for thinkphp",
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"issues": "https://github.com/top-think/think-swoole/issues",
"source": "https://github.com/top-think/think-swoole/tree/v4.0.9"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"time": "2023-03-09T07:52:09+00:00"
}
],
"packages-dev": [
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"name": "symfony/polyfill-php72",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
@ -2190,7 +1771,7 @@
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
"Symfony\\Polyfill\\Php72\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@ -2207,17 +1788,16 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
"source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
},
"funding": [
{
@ -2236,17 +1816,17 @@
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php72",
"name": "symfony/polyfill-php80",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"shasum": ""
},
"require": {
@ -2267,14 +1847,21 @@
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
}
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
@ -2284,7 +1871,7 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
@ -2293,7 +1880,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
"funding": [
{

@ -1,89 +0,0 @@
<?php
return [
'http' => [
'enable' => true,
'host' => '0.0.0.0',
'port' => 9501,
// 'worker_num' => swoole_cpu_num(),
'worker_num' => 4,
'options' => [
'log_file' => env('runtime_path') . 'swoole.log',
],
],
'websocket' => [
'enable' => true,
'handler' => \think\swoole\websocket\Handler::class,
'ping_interval' => 25000,
'ping_timeout' => 60000,
'room' => [
'type' => 'table',
'table' => [
'room_rows' => 8192,
'room_size' => 2048,
'client_rows' => 4096,
'client_size' => 2048,
],
'redis' => [
'host' => '127.0.0.1',
'port' => 6379,
'max_active' => 3,
'max_wait_time' => 5,
],
],
'listen' => [],
'subscribe' => [],
],
'rpc' => [
'server' => [
'enable' => false,
'host' => '0.0.0.0',
'port' => 9000,
'worker_num' => swoole_cpu_num(),
'services' => [],
],
'client' => [],
],
//队列
'queue' => [
'enable' => false,
'workers' => [],
],
'hot_update' => [
'enable' => env('APP_DEBUG', false),
'name' => ['*.php'],
'include' => [app_path()],
'exclude' => [],
],
//连接池
'pool' => [
'db' => [
'enable' => true,
'max_active' => 3,
'max_wait_time' => 5,
],
'cache' => [
'enable' => true,
'max_active' => 3,
'max_wait_time' => 5,
],
//自定义连接池
],
'ipc' => [
'type' => 'unix_socket',
'redis' => [
'host' => '127.0.0.1',
'port' => 6379,
'max_active' => 3,
'max_wait_time' => 5,
],
],
'tables' => [],
//每个worker里需要预加载以共用的实例
'concretes' => [],
//重置器
'resetters' => [],
//每次请求前需要清空的实例
'instances' => [],
//每次请求前需要重新执行的服务
'services' => [],
];
Loading…
Cancel
Save