支持php8.2

This commit is contained in:
taoser 2023-03-16 22:37:21 +08:00
parent 88275662c3
commit 2f9bfdffdb
44 changed files with 737 additions and 325 deletions

86
composer.lock generated
View File

@ -2374,16 +2374,16 @@
},
{
"name": "symfony/var-exporter",
"version": "v5.4.17",
"version": "v5.4.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
"reference": "2adac0a9b55f9fb40b983b790509581dc3db0fff"
"reference": "2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/2adac0a9b55f9fb40b983b790509581dc3db0fff",
"reference": "2adac0a9b55f9fb40b983b790509581dc3db0fff",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6",
"reference": "2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6",
"shasum": "",
"mirrors": [
{
@ -2433,7 +2433,7 @@
"serialize"
],
"support": {
"source": "https://github.com/symfony/var-exporter/tree/v5.4.17"
"source": "https://github.com/symfony/var-exporter/tree/v5.4.19"
},
"funding": [
{
@ -2449,7 +2449,7 @@
"type": "tidelift"
}
],
"time": "2022-12-22T10:10:04+00:00"
"time": "2023-01-12T16:39:29+00:00"
},
{
"name": "taoser/think-addons",
@ -2621,16 +2621,16 @@
},
{
"name": "tightenco/collect",
"version": "v8.83.25",
"version": "v8.83.27",
"source": {
"type": "git",
"url": "https://github.com/tighten/collect.git",
"reference": "7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea"
"reference": "07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tighten/collect/zipball/7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea",
"reference": "7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea",
"url": "https://api.github.com/repos/tighten/collect/zipball/07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6",
"reference": "07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6",
"shasum": "",
"mirrors": [
{
@ -2675,22 +2675,22 @@
],
"support": {
"issues": "https://github.com/tighten/collect/issues",
"source": "https://github.com/tighten/collect/tree/v8.83.25"
"source": "https://github.com/tighten/collect/tree/v8.83.27"
},
"time": "2022-08-22T17:55:07+00:00"
"time": "2023-01-13T18:05:42+00:00"
},
{
"name": "topthink/framework",
"version": "v6.1.1",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/top-think/framework.git",
"reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210"
"reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/framework/zipball/2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210",
"reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210",
"url": "https://api.github.com/repos/top-think/framework/zipball/67235be5b919aaaf1de5aed9839f65d8e766aca3",
"reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3",
"shasum": "",
"mirrors": [
{
@ -2708,7 +2708,7 @@
"psr/log": "~1.0",
"psr/simple-cache": "^1.0",
"topthink/think-helper": "^3.1.1",
"topthink/think-orm": "^2.0"
"topthink/think-orm": "^2.0|^3.0"
},
"require-dev": {
"guzzlehttp/psr7": "^2.1.0",
@ -2746,9 +2746,9 @@
],
"support": {
"issues": "https://github.com/top-think/framework/issues",
"source": "https://github.com/top-think/framework/tree/v6.1.1"
"source": "https://github.com/top-think/framework/tree/v6.1.2"
},
"time": "2022-10-26T03:48:53+00:00"
"time": "2023-02-08T02:24:01+00:00"
},
{
"name": "topthink/think-captcha",
@ -3028,16 +3028,16 @@
},
{
"name": "topthink/think-orm",
"version": "v2.0.56",
"version": "v2.0.57",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-orm.git",
"reference": "75b8512736daaa056d511f42c15bed87c9f3605a"
"reference": "b68e3bb15322dc2d977ac62682d6df05c98bd23c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-orm/zipball/75b8512736daaa056d511f42c15bed87c9f3605a",
"reference": "75b8512736daaa056d511f42c15bed87c9f3605a",
"url": "https://api.github.com/repos/top-think/think-orm/zipball/b68e3bb15322dc2d977ac62682d6df05c98bd23c",
"reference": "b68e3bb15322dc2d977ac62682d6df05c98bd23c",
"shasum": "",
"mirrors": [
{
@ -3083,9 +3083,9 @@
],
"support": {
"issues": "https://github.com/top-think/think-orm/issues",
"source": "https://github.com/top-think/think-orm/tree/v2.0.56"
"source": "https://github.com/top-think/think-orm/tree/v2.0.57"
},
"time": "2022-12-15T02:52:53+00:00"
"time": "2023-02-03T11:35:52+00:00"
},
{
"name": "topthink/think-template",
@ -3328,16 +3328,16 @@
},
{
"name": "workerman/workerman",
"version": "v4.1.5",
"version": "v4.1.6",
"source": {
"type": "git",
"url": "https://github.com/walkor/workerman.git",
"reference": "16bcfc2c7574feea46cdadaaa8ae73f14d464b21"
"reference": "a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/walkor/workerman/zipball/16bcfc2c7574feea46cdadaaa8ae73f14d464b21",
"reference": "16bcfc2c7574feea46cdadaaa8ae73f14d464b21",
"url": "https://api.github.com/repos/walkor/workerman/zipball/a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b",
"reference": "a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b",
"shasum": "",
"mirrors": [
{
@ -3393,7 +3393,7 @@
"type": "patreon"
}
],
"time": "2022-12-14T11:58:06+00:00"
"time": "2023-01-13T02:17:21+00:00"
},
{
"name": "yansongda/pay",
@ -3547,16 +3547,16 @@
},
{
"name": "yzh52521/easyhttp",
"version": "v1.0.5",
"version": "v1.0.6",
"source": {
"type": "git",
"url": "https://github.com/yzh52521/easyhttp.git",
"reference": "a74fa5a1d4f701bd20e581b0731e885aac3daf9f"
"reference": "6c4795316e6847ba691ecad9c9f5fd9f073b33e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yzh52521/easyhttp/zipball/a74fa5a1d4f701bd20e581b0731e885aac3daf9f",
"reference": "a74fa5a1d4f701bd20e581b0731e885aac3daf9f",
"url": "https://api.github.com/repos/yzh52521/easyhttp/zipball/6c4795316e6847ba691ecad9c9f5fd9f073b33e2",
"reference": "6c4795316e6847ba691ecad9c9f5fd9f073b33e2",
"shasum": "",
"mirrors": [
{
@ -3599,24 +3599,24 @@
],
"support": {
"issues": "https://github.com/yzh52521/easyhttp/issues",
"source": "https://github.com/yzh52521/easyhttp/tree/v1.0.5"
"source": "https://github.com/yzh52521/easyhttp/tree/v1.0.6"
},
"time": "2022-12-05T12:18:34+00:00"
"time": "2023-02-08T09:24:06+00:00"
}
],
"packages-dev": [
{
"name": "topthink/think-trace",
"version": "v1.5",
"version": "v1.6",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-trace.git",
"reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7"
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-trace/zipball/55027fd79abb744f32a3be8d9e1ccf873a3ca9b7",
"reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7",
"url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
"shasum": "",
"mirrors": [
{
@ -3627,7 +3627,7 @@
},
"require": {
"php": ">=7.1.0",
"topthink/framework": "^6.0"
"topthink/framework": "^6.0|^8.0"
},
"type": "library",
"extra": {
@ -3658,9 +3658,9 @@
"description": "thinkphp debug trace",
"support": {
"issues": "https://github.com/top-think/think-trace/issues",
"source": "https://github.com/top-think/think-trace/tree/v1.5"
"source": "https://github.com/top-think/think-trace/tree/v1.6"
},
"time": "2022-10-26T07:56:45+00:00"
"time": "2023-02-07T08:36:32+00:00"
}
],
"aliases": [],

View File

@ -14,7 +14,7 @@ return array(
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/think-orm/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'),
'taoser\\think\\' => array($vendorDir . '/taoser/think-auth/src'),
'taoser\\' => array($vendorDir . '/taoser/think-addons/src', $vendorDir . '/taoser/think-setarr/src'),
'phpspirit\\databackup\\' => array($vendorDir . '/lotofbadcode/phpspirit_databackup/src'),

View File

@ -182,8 +182,8 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
array (
0 => __DIR__ . '/..' . '/topthink/framework/src/think',
1 => __DIR__ . '/..' . '/topthink/think-helper/src',
2 => __DIR__ . '/..' . '/topthink/think-template/src',
3 => __DIR__ . '/..' . '/topthink/think-orm/src',
2 => __DIR__ . '/..' . '/topthink/think-orm/src',
3 => __DIR__ . '/..' . '/topthink/think-template/src',
),
'taoser\\think\\' =>
array (

View File

@ -2344,17 +2344,17 @@
},
{
"name": "symfony/var-exporter",
"version": "v5.4.17",
"version_normalized": "5.4.17.0",
"version": "v5.4.19",
"version_normalized": "5.4.19.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
"reference": "2adac0a9b55f9fb40b983b790509581dc3db0fff"
"reference": "2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/2adac0a9b55f9fb40b983b790509581dc3db0fff",
"reference": "2adac0a9b55f9fb40b983b790509581dc3db0fff",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6",
"reference": "2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6",
"shasum": "",
"mirrors": [
{
@ -2370,7 +2370,7 @@
"require-dev": {
"symfony/var-dumper": "^4.4.9|^5.0.9|^6.0"
},
"time": "2022-12-22T10:10:04+00:00",
"time": "2023-01-12T16:39:29+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -2406,7 +2406,7 @@
"serialize"
],
"support": {
"source": "https://github.com/symfony/var-exporter/tree/v5.4.17"
"source": "https://github.com/symfony/var-exporter/tree/v5.4.19"
},
"funding": [
{
@ -2593,18 +2593,24 @@
},
{
"name": "tightenco/collect",
"version": "v8.83.25",
"version_normalized": "8.83.25.0",
"version": "v8.83.27",
"version_normalized": "8.83.27.0",
"source": {
"type": "git",
"url": "https://github.com/tighten/collect.git",
"reference": "7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea"
"reference": "07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tighten/collect/zipball/7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea",
"reference": "7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea",
"shasum": ""
"url": "https://api.github.com/repos/tighten/collect/zipball/07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6",
"reference": "07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": "^7.3|^8.0",
@ -2615,7 +2621,7 @@
"nesbot/carbon": "^2.23.0",
"phpunit/phpunit": "^8.3"
},
"time": "2022-08-22T17:55:07+00:00",
"time": "2023-01-13T18:05:42+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -2644,24 +2650,30 @@
],
"support": {
"issues": "https://github.com/tighten/collect/issues",
"source": "https://github.com/tighten/collect/tree/v8.83.25"
"source": "https://github.com/tighten/collect/tree/v8.83.27"
},
"install-path": "../tightenco/collect"
},
{
"name": "topthink/framework",
"version": "v6.1.1",
"version_normalized": "6.1.1.0",
"version": "v6.1.2",
"version_normalized": "6.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/top-think/framework.git",
"reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210"
"reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/framework/zipball/2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210",
"reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210",
"shasum": ""
"url": "https://api.github.com/repos/top-think/framework/zipball/67235be5b919aaaf1de5aed9839f65d8e766aca3",
"reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": "*",
@ -2672,7 +2684,7 @@
"psr/log": "~1.0",
"psr/simple-cache": "^1.0",
"topthink/think-helper": "^3.1.1",
"topthink/think-orm": "^2.0"
"topthink/think-orm": "^2.0|^3.0"
},
"require-dev": {
"guzzlehttp/psr7": "^2.1.0",
@ -2680,7 +2692,7 @@
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^7.0"
},
"time": "2022-10-26T03:48:53+00:00",
"time": "2023-02-08T02:24:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -2712,7 +2724,7 @@
],
"support": {
"issues": "https://github.com/top-think/framework/issues",
"source": "https://github.com/top-think/framework/tree/v6.1.1"
"source": "https://github.com/top-think/framework/tree/v6.1.2"
},
"install-path": "../topthink/framework"
},
@ -2997,17 +3009,17 @@
},
{
"name": "topthink/think-orm",
"version": "v2.0.56",
"version_normalized": "2.0.56.0",
"version": "v2.0.57",
"version_normalized": "2.0.57.0",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-orm.git",
"reference": "75b8512736daaa056d511f42c15bed87c9f3605a"
"reference": "b68e3bb15322dc2d977ac62682d6df05c98bd23c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-orm/zipball/75b8512736daaa056d511f42c15bed87c9f3605a",
"reference": "75b8512736daaa056d511f42c15bed87c9f3605a",
"url": "https://api.github.com/repos/top-think/think-orm/zipball/b68e3bb15322dc2d977ac62682d6df05c98bd23c",
"reference": "b68e3bb15322dc2d977ac62682d6df05c98bd23c",
"shasum": "",
"mirrors": [
{
@ -3027,7 +3039,7 @@
"require-dev": {
"phpunit/phpunit": "^7|^8|^9.5"
},
"time": "2022-12-15T02:52:53+00:00",
"time": "2023-02-03T11:35:52+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -3055,7 +3067,7 @@
],
"support": {
"issues": "https://github.com/top-think/think-orm/issues",
"source": "https://github.com/top-think/think-orm/tree/v2.0.56"
"source": "https://github.com/top-think/think-orm/tree/v2.0.57"
},
"install-path": "../topthink/think-orm"
},
@ -3111,24 +3123,30 @@
},
{
"name": "topthink/think-trace",
"version": "v1.5",
"version_normalized": "1.5.0.0",
"version": "v1.6",
"version_normalized": "1.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-trace.git",
"reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7"
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-trace/zipball/55027fd79abb744f32a3be8d9e1ccf873a3ca9b7",
"reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7",
"shasum": ""
"url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1.0",
"topthink/framework": "^6.0"
"topthink/framework": "^6.0|^8.0"
},
"time": "2022-10-26T07:56:45+00:00",
"time": "2023-02-07T08:36:32+00:00",
"type": "library",
"extra": {
"think": {
@ -3159,7 +3177,7 @@
"description": "thinkphp debug trace",
"support": {
"issues": "https://github.com/top-think/think-trace/issues",
"source": "https://github.com/top-think/think-trace/tree/v1.5"
"source": "https://github.com/top-think/think-trace/tree/v1.6"
},
"install-path": "../topthink/think-trace"
},
@ -3359,17 +3377,17 @@
},
{
"name": "workerman/workerman",
"version": "v4.1.5",
"version_normalized": "4.1.5.0",
"version": "v4.1.6",
"version_normalized": "4.1.6.0",
"source": {
"type": "git",
"url": "https://github.com/walkor/workerman.git",
"reference": "16bcfc2c7574feea46cdadaaa8ae73f14d464b21"
"reference": "a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/walkor/workerman/zipball/16bcfc2c7574feea46cdadaaa8ae73f14d464b21",
"reference": "16bcfc2c7574feea46cdadaaa8ae73f14d464b21",
"url": "https://api.github.com/repos/walkor/workerman/zipball/a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b",
"reference": "a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b",
"shasum": "",
"mirrors": [
{
@ -3384,7 +3402,7 @@
"suggest": {
"ext-event": "For better performance. "
},
"time": "2022-12-14T11:58:06+00:00",
"time": "2023-01-13T02:17:21+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -3575,17 +3593,17 @@
},
{
"name": "yzh52521/easyhttp",
"version": "v1.0.5",
"version_normalized": "1.0.5.0",
"version": "v1.0.6",
"version_normalized": "1.0.6.0",
"source": {
"type": "git",
"url": "https://github.com/yzh52521/easyhttp.git",
"reference": "a74fa5a1d4f701bd20e581b0731e885aac3daf9f"
"reference": "6c4795316e6847ba691ecad9c9f5fd9f073b33e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yzh52521/easyhttp/zipball/a74fa5a1d4f701bd20e581b0731e885aac3daf9f",
"reference": "a74fa5a1d4f701bd20e581b0731e885aac3daf9f",
"url": "https://api.github.com/repos/yzh52521/easyhttp/zipball/6c4795316e6847ba691ecad9c9f5fd9f073b33e2",
"reference": "6c4795316e6847ba691ecad9c9f5fd9f073b33e2",
"shasum": "",
"mirrors": [
{
@ -3599,7 +3617,7 @@
"php": "^7.2.5|^8.0",
"psr/log": "^1.0|^2.0|^3.0"
},
"time": "2022-12-05T12:18:34+00:00",
"time": "2023-02-08T09:24:06+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -3630,7 +3648,7 @@
],
"support": {
"issues": "https://github.com/yzh52521/easyhttp/issues",
"source": "https://github.com/yzh52521/easyhttp/tree/v1.0.5"
"source": "https://github.com/yzh52521/easyhttp/tree/v1.0.6"
},
"install-path": "../yzh52521/easyhttp"
}

View File

@ -3,7 +3,7 @@
'name' => 'taoser/taoler',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '09978bd07a1c769bc266ff2cb0c8c639bc3d41e8',
'reference' => '10e754e142b4e3e00982158b19b87ca5d74e6b81',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -347,9 +347,9 @@
'dev_requirement' => false,
),
'symfony/var-exporter' => array(
'pretty_version' => 'v5.4.17',
'version' => '5.4.17.0',
'reference' => '2adac0a9b55f9fb40b983b790509581dc3db0fff',
'pretty_version' => 'v5.4.19',
'version' => '5.4.19.0',
'reference' => '2a1d06fcf2b30829d6c01dae8e6e188424d1f8f6',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-exporter',
'aliases' => array(),
@ -358,7 +358,7 @@
'taoser/taoler' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '09978bd07a1c769bc266ff2cb0c8c639bc3d41e8',
'reference' => '10e754e142b4e3e00982158b19b87ca5d74e6b81',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -392,18 +392,18 @@
'dev_requirement' => false,
),
'tightenco/collect' => array(
'pretty_version' => 'v8.83.25',
'version' => '8.83.25.0',
'reference' => '7d2a6fc5e97c5f7209a780bea98f35042c1fd0ea',
'pretty_version' => 'v8.83.27',
'version' => '8.83.27.0',
'reference' => '07eed6cf7441c7a69c379fdcb118eec1a1fdd0e6',
'type' => 'library',
'install_path' => __DIR__ . '/../tightenco/collect',
'aliases' => array(),
'dev_requirement' => false,
),
'topthink/framework' => array(
'pretty_version' => 'v6.1.1',
'version' => '6.1.1.0',
'reference' => '2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210',
'pretty_version' => 'v6.1.2',
'version' => '6.1.2.0',
'reference' => '67235be5b919aaaf1de5aed9839f65d8e766aca3',
'type' => 'library',
'install_path' => __DIR__ . '/../topthink/framework',
'aliases' => array(),
@ -455,9 +455,9 @@
'dev_requirement' => false,
),
'topthink/think-orm' => array(
'pretty_version' => 'v2.0.56',
'version' => '2.0.56.0',
'reference' => '75b8512736daaa056d511f42c15bed87c9f3605a',
'pretty_version' => 'v2.0.57',
'version' => '2.0.57.0',
'reference' => 'b68e3bb15322dc2d977ac62682d6df05c98bd23c',
'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-orm',
'aliases' => array(),
@ -473,9 +473,9 @@
'dev_requirement' => false,
),
'topthink/think-trace' => array(
'pretty_version' => 'v1.5',
'version' => '1.5.0.0',
'reference' => '55027fd79abb744f32a3be8d9e1ccf873a3ca9b7',
'pretty_version' => 'v1.6',
'version' => '1.6.0.0',
'reference' => '136cd5d97e8bdb780e4b5c1637c588ed7ca3e142',
'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-trace',
'aliases' => array(),
@ -518,9 +518,9 @@
'dev_requirement' => false,
),
'workerman/workerman' => array(
'pretty_version' => 'v4.1.5',
'version' => '4.1.5.0',
'reference' => '16bcfc2c7574feea46cdadaaa8ae73f14d464b21',
'pretty_version' => 'v4.1.6',
'version' => '4.1.6.0',
'reference' => 'a278ddcc78040e5d1e25ca2022eeb7ccfdccc86b',
'type' => 'library',
'install_path' => __DIR__ . '/../workerman/workerman',
'aliases' => array(),
@ -545,9 +545,9 @@
'dev_requirement' => false,
),
'yzh52521/easyhttp' => array(
'pretty_version' => 'v1.0.5',
'version' => '1.0.5.0',
'reference' => 'a74fa5a1d4f701bd20e581b0731e885aac3daf9f',
'pretty_version' => 'v1.0.6',
'version' => '1.0.6.0',
'reference' => '6c4795316e6847ba691ecad9c9f5fd9f073b33e2',
'type' => 'library',
'install_path' => __DIR__ . '/../yzh52521/easyhttp',
'aliases' => array(),

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2023-01-04 21:42:43
// This file is automatically generated at:2023-02-10 14:24:47
declare (strict_types = 1);
return array (
0 => 'taoser\\addons\\Service',

View File

@ -198,7 +198,7 @@ class Exporter
case true === $value: return 'true';
case null === $value: return 'null';
case '' === $value: return "''";
case $value instanceof \UnitEnum: return ltrim(var_export($value, true), '\\');
case $value instanceof \UnitEnum: return '\\'.ltrim(var_export($value, true), '\\');
}
if ($value instanceof Reference) {

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2022 Fabien Potencier
Copyright (c) 2018-2023 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -21,7 +21,6 @@ ThinkPHP 6.1
* 原生多应用支持
* 系统服务注入支持
* ORM作为独立组件使用
* 增加Filesystem
* 全新的事件系统
* 模板引擎分离出核心
* 内部功能中间件化
@ -34,7 +33,7 @@ ThinkPHP 6.1
* 统一和精简大量用法
> ThinkPHP6.1的运行环境要求PHP7.2.5+兼容PHP8.1
> ThinkPHP6.1的运行环境要求PHP7.2.5+最高兼容PHP8.2
## 安装

View File

@ -26,7 +26,7 @@
"psr/container": "~1.0",
"psr/simple-cache": "^1.0",
"psr/http-message": "^1.0",
"topthink/think-orm": "^2.0",
"topthink/think-orm": "^2.0|^3.0",
"topthink/think-helper": "^3.1.1"
},
"require-dev": {

View File

@ -35,11 +35,10 @@ use think\initializer\RegisterService;
* @property Cookie $cookie
* @property Session $session
* @property Validate $validate
* @property Filesystem $filesystem
*/
class App extends Container
{
const VERSION = '6.1.0';
const VERSION = '6.1.1';
/**
* 应用调试模式

View File

@ -445,7 +445,9 @@ class Container implements ContainerInterface, ArrayAccess, IteratorAggregate, C
$lowerName = Str::snake($name);
$reflectionType = $param->getType();
if ($reflectionType && $reflectionType->isBuiltin() === false) {
if ($param->isVariadic()) {
return array_merge($args, array_values($vars));
} elseif ($reflectionType && $reflectionType instanceof \ReflectionNamedType && $reflectionType->isBuiltin() === false) {
$args[] = $this->getObjectParam($reflectionType->getName(), $vars);
} elseif (1 == $type && !empty($vars)) {
$args[] = array_shift($vars);

View File

@ -30,6 +30,12 @@ class File extends SplFileInfo
protected $hashName;
/**
* 保存的文件后缀
* @var string
*/
protected $extension;
public function __construct(string $path, bool $checkPath = true)
{
if ($checkPath && !is_file($path)) {
@ -155,6 +161,16 @@ class File extends SplFileInfo
return $this->getExtension();
}
/**
* 指定保存文件的扩展名
* @param string $extension
* @return void
*/
public function setExtension(string $extension): void
{
$this->extension = $extension;
}
/**
* 自动生成文件名
* @access public
@ -182,6 +198,7 @@ class File extends SplFileInfo
}
}
return $this->hashName . '.' . $this->extension();
$extension = $this->extension ?? $this->extension();
return $this->hashName . ($extension ? '.' . $extension : '');
}
}

View File

@ -295,7 +295,7 @@ class Ask
$width = max(array_map('strlen', array_keys($this->question->getChoices())));
foreach ($this->question->getChoices() as $key => $value) {
$this->output->writeln(sprintf(" [<comment>%-${width}s</comment>] %s", $key, $value));
$this->output->writeln(sprintf(" [<comment>%-{$width}s</comment>] %s", $key, $value));
}
}

View File

@ -219,7 +219,7 @@ class Descriptor
$width = $this->getColumnWidth($description->getNamespaces());
foreach ($description->getCommands() as $command) {
$this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options);
$this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options);
$this->writeText("\n");
}
} else {

View File

@ -15,62 +15,62 @@ namespace think\validate;
/**
* Class ValidateRule
* @package think\validate
* @method ValidateRule confirm(mixed $rule, string $msg = '') static 验证是否和某个字段的值一致
* @method ValidateRule different(mixed $rule, string $msg = '') static 验证是否和某个字段的值是否不同
* @method ValidateRule egt(mixed $rule, string $msg = '') static 验证是否大于等于某个值
* @method ValidateRule gt(mixed $rule, string $msg = '') static 验证是否大于某个值
* @method ValidateRule elt(mixed $rule, string $msg = '') static 验证是否小于等于某个值
* @method ValidateRule lt(mixed $rule, string $msg = '') static 验证是否小于某个值
* @method ValidateRule eg(mixed $rule, string $msg = '') static 验证是否等于某个值
* @method ValidateRule in(mixed $rule, string $msg = '') static 验证是否在范围内
* @method ValidateRule notIn(mixed $rule, string $msg = '') static 验证是否不在某个范围
* @method ValidateRule between(mixed $rule, string $msg = '') static 验证是否在某个区间
* @method ValidateRule notBetween(mixed $rule, string $msg = '') static 验证是否不在某个区间
* @method ValidateRule length(mixed $rule, string $msg = '') static 验证数据长度
* @method ValidateRule max(mixed $rule, string $msg = '') static 验证数据最大长度
* @method ValidateRule min(mixed $rule, string $msg = '') static 验证数据最小长度
* @method ValidateRule after(mixed $rule, string $msg = '') static 验证日期
* @method ValidateRule before(mixed $rule, string $msg = '') static 验证日期
* @method ValidateRule expire(mixed $rule, string $msg = '') static 验证有效期
* @method ValidateRule allowIp(mixed $rule, string $msg = '') static 验证IP许可
* @method ValidateRule denyIp(mixed $rule, string $msg = '') static 验证IP禁用
* @method ValidateRule regex(mixed $rule, string $msg = '') static 使用正则验证数据
* @method ValidateRule token(mixed $rule='__token__', string $msg = '') static 验证表单令牌
* @method ValidateRule is(mixed $rule, string $msg = '') static 验证字段值是否为有效格式
* @method ValidateRule isRequire(mixed $rule = null, string $msg = '') static 验证字段必须
* @method ValidateRule isNumber(mixed $rule = null, string $msg = '') static 验证字段值是否为数字
* @method ValidateRule isArray(mixed $rule = null, string $msg = '') static 验证字段值是否为数组
* @method ValidateRule isInteger(mixed $rule = null, string $msg = '') static 验证字段值是否为整形
* @method ValidateRule isFloat(mixed $rule = null, string $msg = '') static 验证字段值是否为浮点数
* @method ValidateRule isMobile(mixed $rule = null, string $msg = '') static 验证字段值是否为手机
* @method ValidateRule isIdCard(mixed $rule = null, string $msg = '') static 验证字段值是否为身份证号码
* @method ValidateRule isChs(mixed $rule = null, string $msg = '') static 验证字段值是否为中文
* @method ValidateRule isChsDash(mixed $rule = null, string $msg = '') static 验证字段值是否为中文字母及下划线
* @method ValidateRule isChsAlpha(mixed $rule = null, string $msg = '') static 验证字段值是否为中文和字母
* @method ValidateRule isChsAlphaNum(mixed $rule = null, string $msg = '') static 验证字段值是否为中文字母和数字
* @method ValidateRule isDate(mixed $rule = null, string $msg = '') static 验证字段值是否为有效格式
* @method ValidateRule isBool(mixed $rule = null, string $msg = '') static 验证字段值是否为布尔值
* @method ValidateRule isAlpha(mixed $rule = null, string $msg = '') static 验证字段值是否为字母
* @method ValidateRule isAlphaDash(mixed $rule = null, string $msg = '') static 验证字段值是否为字母和下划线
* @method ValidateRule isAlphaNum(mixed $rule = null, string $msg = '') static 验证字段值是否为字母和数字
* @method ValidateRule isAccepted(mixed $rule = null, string $msg = '') static 验证字段值是否为yes, on, 或是 1
* @method ValidateRule isEmail(mixed $rule = null, string $msg = '') static 验证字段值是否为有效邮箱格式
* @method ValidateRule isUrl(mixed $rule = null, string $msg = '') static 验证字段值是否为有效URL地址
* @method ValidateRule activeUrl(mixed $rule, string $msg = '') static 验证是否为合格的域名或者IP
* @method ValidateRule ip(mixed $rule, string $msg = '') static 验证是否有效IP
* @method ValidateRule fileExt(mixed $rule, string $msg = '') static 验证文件后缀
* @method ValidateRule fileMime(mixed $rule, string $msg = '') static 验证文件类型
* @method ValidateRule fileSize(mixed $rule, string $msg = '') static 验证文件大小
* @method ValidateRule image(mixed $rule, string $msg = '') static 验证图像文件
* @method ValidateRule method(mixed $rule, string $msg = '') static 验证请求类型
* @method ValidateRule dateFormat(mixed $rule, string $msg = '') static 验证时间和日期是否符合指定格式
* @method ValidateRule unique(mixed $rule, string $msg = '') static 验证是否唯一
* @method ValidateRule behavior(mixed $rule, string $msg = '') static 使用行为类验证
* @method ValidateRule filter(mixed $rule, string $msg = '') static 使用filter_var方式验证
* @method ValidateRule requireIf(mixed $rule, string $msg = '') static 验证某个字段等于某个值的时候必须
* @method ValidateRule requireCallback(mixed $rule, string $msg = '') static 通过回调方法验证某个字段是否必须
* @method ValidateRule requireWith(mixed $rule, string $msg = '') static 验证某个字段有值的情况下必须
* @method ValidateRule must(mixed $rule = null, string $msg = '') static 必须验证
* @method static ValidateRule confirm(mixed $rule, string $msg = '') 验证是否和某个字段的值一致
* @method static ValidateRule different(mixed $rule, string $msg = '') 验证是否和某个字段的值是否不同
* @method static ValidateRule egt(mixed $rule, string $msg = '') 验证是否大于等于某个值
* @method static ValidateRule gt(mixed $rule, string $msg = '') 验证是否大于某个值
* @method static ValidateRule elt(mixed $rule, string $msg = '') 验证是否小于等于某个值
* @method static ValidateRule lt(mixed $rule, string $msg = '') 验证是否小于某个值
* @method static ValidateRule eg(mixed $rule, string $msg = '') 验证是否等于某个值
* @method static ValidateRule in(mixed $rule, string $msg = '') 验证是否在范围内
* @method static ValidateRule notIn(mixed $rule, string $msg = '') 验证是否不在某个范围
* @method static ValidateRule between(mixed $rule, string $msg = '') 验证是否在某个区间
* @method static ValidateRule notBetween(mixed $rule, string $msg = '') 验证是否不在某个区间
* @method static ValidateRule length(mixed $rule, string $msg = '') 验证数据长度
* @method static ValidateRule max(mixed $rule, string $msg = '') 验证数据最大长度
* @method static ValidateRule min(mixed $rule, string $msg = '') 验证数据最小长度
* @method static ValidateRule after(mixed $rule, string $msg = '') 验证日期
* @method static ValidateRule before(mixed $rule, string $msg = '') 验证日期
* @method static ValidateRule expire(mixed $rule, string $msg = '') 验证有效期
* @method static ValidateRule allowIp(mixed $rule, string $msg = '') 验证IP许可
* @method static ValidateRule denyIp(mixed $rule, string $msg = '') 验证IP禁用
* @method static ValidateRule regex(mixed $rule, string $msg = '') 使用正则验证数据
* @method static ValidateRule token(mixed $rule='__token__', string $msg = '') 验证表单令牌
* @method static ValidateRule is(mixed $rule, string $msg = '') 验证字段值是否为有效格式
* @method static ValidateRule isRequire(mixed $rule = null, string $msg = '') 验证字段必须
* @method static ValidateRule isNumber(mixed $rule = null, string $msg = '') 验证字段值是否为数字
* @method static ValidateRule isArray(mixed $rule = null, string $msg = '') 验证字段值是否为数组
* @method static ValidateRule isInteger(mixed $rule = null, string $msg = '') 验证字段值是否为整形
* @method static ValidateRule isFloat(mixed $rule = null, string $msg = '') 验证字段值是否为浮点数
* @method static ValidateRule isMobile(mixed $rule = null, string $msg = '') 验证字段值是否为手机
* @method static ValidateRule isIdCard(mixed $rule = null, string $msg = '') 验证字段值是否为身份证号码
* @method static ValidateRule isChs(mixed $rule = null, string $msg = '') 验证字段值是否为中文
* @method static ValidateRule isChsDash(mixed $rule = null, string $msg = '') 验证字段值是否为中文字母及下划线
* @method static ValidateRule isChsAlpha(mixed $rule = null, string $msg = '') 验证字段值是否为中文和字母
* @method static ValidateRule isChsAlphaNum(mixed $rule = null, string $msg = '') 验证字段值是否为中文字母和数字
* @method static ValidateRule isDate(mixed $rule = null, string $msg = '') 验证字段值是否为有效格式
* @method static ValidateRule isBool(mixed $rule = null, string $msg = '') 验证字段值是否为布尔值
* @method static ValidateRule isAlpha(mixed $rule = null, string $msg = '') 验证字段值是否为字母
* @method static ValidateRule isAlphaDash(mixed $rule = null, string $msg = '') 验证字段值是否为字母和下划线
* @method static ValidateRule isAlphaNum(mixed $rule = null, string $msg = '') 验证字段值是否为字母和数字
* @method static ValidateRule isAccepted(mixed $rule = null, string $msg = '') 验证字段值是否为yes, on, 或是 1
* @method static ValidateRule isEmail(mixed $rule = null, string $msg = '') 验证字段值是否为有效邮箱格式
* @method static ValidateRule isUrl(mixed $rule = null, string $msg = '') 验证字段值是否为有效URL地址
* @method static ValidateRule activeUrl(mixed $rule, string $msg = '') 验证是否为合格的域名或者IP
* @method static ValidateRule ip(mixed $rule, string $msg = '') 验证是否有效IP
* @method static ValidateRule fileExt(mixed $rule, string $msg = '') 验证文件后缀
* @method static ValidateRule fileMime(mixed $rule, string $msg = '') 验证文件类型
* @method static ValidateRule fileSize(mixed $rule, string $msg = '') 验证文件大小
* @method static ValidateRule image(mixed $rule, string $msg = '') 验证图像文件
* @method static ValidateRule method(mixed $rule, string $msg = '') 验证请求类型
* @method static ValidateRule dateFormat(mixed $rule, string $msg = '') 验证时间和日期是否符合指定格式
* @method static ValidateRule unique(mixed $rule, string $msg = '') 验证是否唯一
* @method static ValidateRule behavior(mixed $rule, string $msg = '') 使用行为类验证
* @method static ValidateRule filter(mixed $rule, string $msg = '') 使用filter_var方式验证
* @method static ValidateRule requireIf(mixed $rule, string $msg = '') 验证某个字段等于某个值的时候必须
* @method static ValidateRule requireCallback(mixed $rule, string $msg = '') 通过回调方法验证某个字段是否必须
* @method static ValidateRule requireWith(mixed $rule, string $msg = '') 验证某个字段有值的情况下必须
* @method static ValidateRule must(mixed $rule = null, string $msg = '') 必须验证
*/
class ValidateRule
{

View File

@ -158,7 +158,8 @@ abstract class Builder
if (false !== strpos($key, '->')) {
[$key, $name] = explode('->', $key, 2);
$item = $this->parseKey($query, $key);
$result[$item] = 'json_set(' . $item . ', \'$.' . $name . '\', ' . $this->parseDataBind($query, $key . '->' . $name, $val, $bind) . ')';
$result[$item . '->' . $name] = 'json_set(' . $item . ', \'$.' . $name . '\', ' . $this->parseDataBind($query, $key . '->' . $name, $val, $bind) . ')';
} elseif (false === strpos($key, '.') && !in_array($key, $fields, true)) {
if ($options['strict']) {
throw new Exception('fields not exists:[' . $key . ']');
@ -176,7 +177,7 @@ abstract class Builder
}
} elseif (is_scalar($val)) {
// 过滤非标量数据
$result[$item] = $this->parseDataBind($query, $key, $val, $bind);
$result[$item] = !$query->isAutoBind() ? $val : $this->parseDataBind($query, $key, $val, $bind);
}
}
@ -761,18 +762,23 @@ abstract class Builder
if (count($value) === 0) {
return 'IN' == $exp ? '0 = 1' : '1 = 1';
}
$array = [];
foreach ($value as $v) {
$name = $query->bindValue($v, $bindType);
$array[] = ':' . $name;
if ($query->isAutoBind()) {
$array = [];
foreach ($value as $v) {
$name = $query->bindValue($v, $bindType);
$array[] = ':' . $name;
}
} else {
$array = $value;
}
if (count($array) == 1) {
return $key . ('IN' == $exp ? ' = ' : ' <> ') . $array[0];
} else {
$value = implode(',', $array);
}
$value = implode(',', $array);
}
return $key . ' ' . $exp . ' (' . $value . ')';
@ -1139,7 +1145,8 @@ abstract class Builder
$this->parseComment($query, $options['comment']),
$this->parseForce($query, $options['force']),
],
$this->selectSql);
$this->selectSql
);
}
/**
@ -1171,7 +1178,8 @@ abstract class Builder
implode(' , ', $values),
$this->parseComment($query, $options['comment']),
],
$this->insertSql);
$this->insertSql
);
}
/**
@ -1222,7 +1230,8 @@ abstract class Builder
implode(' UNION ALL ', $values),
$this->parseComment($query, $options['comment']),
],
$this->insertAllSql);
$this->insertAllSql
);
}
/**
@ -1276,7 +1285,8 @@ abstract class Builder
$this->parseLock($query, $options['lock']),
$this->parseComment($query, $options['comment']),
],
$this->updateSql);
$this->updateSql
);
}
/**
@ -1302,6 +1312,7 @@ abstract class Builder
$this->parseLock($query, $options['lock']),
$this->parseComment($query, $options['comment']),
],
$this->deleteSql);
$this->deleteSql
);
}
}

View File

@ -8,7 +8,7 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
declare (strict_types = 1);
declare(strict_types=1);
namespace think\db;

View File

@ -8,7 +8,7 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
declare (strict_types = 1);
declare(strict_types=1);
namespace think\db;
@ -81,6 +81,8 @@ abstract class PDOConnection extends Connection
'break_reconnect' => false,
// 断线标识字符串
'break_match_str' => [],
// 自动参数绑定
'auto_param_bind' => true,
];
/**
@ -1281,8 +1283,8 @@ abstract class PDOConnection extends Connection
// 判断占位符
$sql = is_numeric($key) ?
substr_replace($sql, $value, strpos($sql, '?'), 1) :
substr_replace($sql, $value, strpos($sql, ':' . $key), strlen(':' . $key));
substr_replace($sql, $value, strpos($sql, '?'), 1) :
substr_replace($sql, $value, strpos($sql, ':' . $key), strlen(':' . $key));
}
return rtrim($sql);
@ -1758,6 +1760,17 @@ abstract class PDOConnection extends Connection
return $this->connect($dbConfig, $r, $r == $m ? false : $dbMaster);
}
/**
* 获取数据库的唯一标识
* @access public
* @param string $suffix 标识后缀
* @return string
*/
public function getUniqueXid(string $suffix = ''): string
{
return $this->config['hostname'] . '_' . $this->config['database'] . $suffix;
}
/**
* 执行数据库Xa事务
* @access public
@ -1783,7 +1796,7 @@ abstract class PDOConnection extends Connection
$dbs[$key] = $db;
}
$db->startTransXa($xid);
$db->startTransXa($db->getUniqueXid('_' . $xid) );
}
try {
@ -1793,17 +1806,17 @@ abstract class PDOConnection extends Connection
}
foreach ($dbs as $db) {
$db->prepareXa($xid);
$db->prepareXa($db->getUniqueXid('_' . $xid));
}
foreach ($dbs as $db) {
$db->commitXa($xid);
$db->commitXa($db->getUniqueXid('_' . $xid) );
}
return $result;
} catch (\Exception | \Throwable $e) {
foreach ($dbs as $db) {
$db->rollbackXa($xid);
$db->rollbackXa($db->getUniqueXid('_' . $xid) );
}
throw $e;
}
@ -1816,7 +1829,8 @@ abstract class PDOConnection extends Connection
* @return void
*/
public function startTransXa(string $xid): void
{}
{
}
/**
* 预编译XA事务
@ -1825,7 +1839,8 @@ abstract class PDOConnection extends Connection
* @return void
*/
public function prepareXa(string $xid): void
{}
{
}
/**
* 提交XA事务
@ -1834,7 +1849,8 @@ abstract class PDOConnection extends Connection
* @return void
*/
public function commitXa(string $xid): void
{}
{
}
/**
* 回滚XA事务
@ -1843,5 +1859,6 @@ abstract class PDOConnection extends Connection
* @return void
*/
public function rollbackXa(string $xid): void
{}
{
}
}

View File

@ -13,7 +13,6 @@ declare (strict_types = 1);
namespace think\db;
use PDOStatement;
use think\helper\Str;
/**
* PDO数据查询类

View File

@ -101,7 +101,8 @@ class Mysql extends Builder
$this->parseComment($query, $options['comment']),
$this->parseForce($query, $options['force']),
],
$this->selectSql);
$this->selectSql
);
}
/**
@ -136,7 +137,8 @@ class Mysql extends Builder
$this->parseDuplicate($query, $options['duplicate']),
$this->parseComment($query, $options['comment']),
],
$this->insertSql);
$this->insertSql
);
}
/**
@ -190,7 +192,8 @@ class Mysql extends Builder
$this->parseDuplicate($query, $options['duplicate']),
$this->parseComment($query, $options['comment']),
],
$this->insertAllSql);
$this->insertAllSql
);
}
/**
@ -208,9 +211,10 @@ class Mysql extends Builder
if (empty($data)) {
return '';
}
$set = [];
foreach ($data as $key => $val) {
$set[] = $key . ' = ' . $val;
$set[] = (strpos($key, '->') ? strstr($key, '->', true) : $key) . ' = ' . $val;
}
return str_replace(
@ -227,7 +231,8 @@ class Mysql extends Builder
$this->parseLock($query, $options['lock']),
$this->parseComment($query, $options['comment']),
],
$this->updateSql);
$this->updateSql
);
}
/**
@ -254,7 +259,8 @@ class Mysql extends Builder
$this->parseLock($query, $options['lock']),
$this->parseComment($query, $options['comment']),
],
$this->deleteSql);
$this->deleteSql
);
}
/**

View File

@ -13,7 +13,6 @@ declare (strict_types = 1);
namespace think\db\concern;
use think\db\Raw;
use think\helper\Str;
/**
* JOIN和VIEW查询

View File

@ -64,6 +64,33 @@ trait ParamsBind
return isset($this->bind[$key]);
}
/**
* 设置自动参数绑定
* @access public
* @param bool $bind 是否自动参数绑定
* @return $this
*/
public function autoBind(bool $bind)
{
$this->options['auto_bind'] = $bind;
return $this;
}
/**
* 检测是否开启自动参数绑定
* @access public
* @return bool
*/
public function isAutoBind(): bool
{
$autoBind = $this->getConfig('auto_param_bind');
if (null !== $this->getOptions('auto_bind')) {
$autoBind = $this->getOptions('auto_bind');
}
return (bool) $autoBind;
}
/**
* 参数绑定
* @access public

View File

@ -60,7 +60,7 @@ class Sqlsrv extends PDOConnection
public function getFields(string $tableName): array
{
[$tableName] = explode(' ', $tableName);
strpos($tableName,'.') && $tableName = substr($tableName,strpos($tableName,'.') + 1);
strpos($tableName, '.') && $tableName = substr($tableName, strpos($tableName, '.') + 1);
$sql = "SELECT column_name, data_type, column_default, is_nullable
FROM information_schema.tables AS t
JOIN information_schema.columns AS c

View File

@ -67,12 +67,6 @@ abstract class Relation
*/
protected $selfRelation = false;
/**
* 关联数据数量限制
* @var int
*/
protected $withLimit;
/**
* 关联数据字段限制
* @var array
@ -200,18 +194,6 @@ abstract class Relation
}
}
/**
* 限制关联数据的数量
* @access public
* @param int $limit 关联数量限制
* @return $this
*/
public function withLimit(int $limit)
{
$this->withLimit = $limit;
return $this;
}
/**
* 限制关联数据的字段
* @access public
@ -244,6 +226,18 @@ abstract class Relation
return $this;
}
/**
* 限制关联数据的数量
* @access public
* @param int $limit 关联数量限制
* @return $this
*/
public function withLimit(int $limit)
{
$this->query->limit($limit);
return $this;
}
/**
* 设置关联数据不存在的时候默认值
* @access public
@ -281,14 +275,15 @@ abstract class Relation
* @access protected
* @return mixed
*/
protected function getClosureType(Closure $closure)
protected function getClosureType(Closure $closure, $query = null)
{
$reflect = new ReflectionFunction($closure);
$params = $reflect->getParameters();
if (!empty($params)) {
$type = $params[0]->getType();
return is_null($type) || Relation::class == $type->getName() ? $this : $this->query;
$type = $params[0]->getType();
$query = $query ?: $this->query;
return is_null($type) || Relation::class == $type->getName() ? $this : $query;
}
return $this;

View File

@ -15,7 +15,6 @@ namespace think\model\concern;
use InvalidArgumentException;
use think\db\Raw;
use think\helper\Str;
use think\Model;
use think\model\Relation;
/**
@ -383,6 +382,8 @@ trait Attribute
} elseif (isset($this->type[$name])) {
// 类型转换
$value = $this->writeTransform($value, $this->type[$name]);
} elseif ($this->isRelationAttr($name)) {
$this->relation[$name] = $value;
} elseif ((array_key_exists($name, $this->origin) || empty($this->origin)) && is_object($value) && method_exists($value, '__toString')) {
// 对象类型
$value = $value->__toString();
@ -446,6 +447,7 @@ trait Attribute
break;
case 'array':
$value = (array) $value;
// no break
case 'json':
$option = !empty($param) ? (int) $param : JSON_UNESCAPED_UNICODE;
$value = json_encode($value, $option);

View File

@ -241,7 +241,7 @@ trait Conversion
if (isset($this->visible[$key]) && is_array($this->visible[$key])) {
$val->visible($this->visible[$key]);
} elseif (isset($this->hidden[$key]) && is_array($this->hidden[$key])) {
$val->hidden($this->hidden[$key]);
$val->hidden($this->hidden[$key], true);
}
// 关联模型对象
if (!isset($this->hidden[$key]) || true !== $this->hidden[$key]) {

View File

@ -346,7 +346,7 @@ trait RelationShip
*/
public function bindAttr(string $relation, array $attrs = [])
{
$relation = $this->getRelation($relation);
$relation = $this->getRelation($relation, true);
foreach ($attrs as $key => $attr) {
$key = is_numeric($key) ? $attr : $key;

View File

@ -14,7 +14,6 @@ namespace think\model\relation;
use Closure;
use think\db\BaseQuery as Query;
use think\helper\Str;
use think\Model;
/**

View File

@ -346,6 +346,11 @@ class BelongsToMany extends Relation
$closure($this->getClosureType($closure));
}
$withLimit = $this->query->getOptions('limit');
if ($withLimit) {
$this->query->removeOption('limit');
}
// 预载入关联查询 支持嵌套预载入
$list = $this->belongsToManyQuery($this->foreignKey, $this->localKey, $where)
->with($subRelation)
@ -353,12 +358,12 @@ class BelongsToMany extends Relation
->select();
// 组装模型数据
$data = [];
$data = [];
foreach ($list as $set) {
$pivot = $this->matchPivot($set);
$key = $pivot[$this->localKey];
if ($this->withLimit && isset($data[$key]) && count($data[$key]) >= $this->withLimit) {
if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) {
continue;
}
@ -389,10 +394,6 @@ class BelongsToMany extends Relation
$fields = $this->getQueryFields($tableName);
if ($this->withLimit) {
$this->query->limit($this->withLimit);
}
$this->query
->field($fields)
->tableField(true, $table, 'pivot', 'pivot__')

View File

@ -15,7 +15,6 @@ namespace think\model\relation;
use Closure;
use think\Collection;
use think\db\BaseQuery as Query;
use think\helper\Str;
use think\Model;
use think\model\Relation;
@ -58,10 +57,6 @@ class HasMany extends Relation
$closure($this->getClosureType($closure));
}
if ($this->withLimit) {
$this->query->limit($this->withLimit);
}
return $this->query
->where($this->foreignKey, $this->parent->{$this->localKey})
->relation($subRelation)
@ -210,6 +205,11 @@ class HasMany extends Relation
$this->query->withoutField($this->withoutField);
}
$withLimit = $this->query->getOptions('limit');
if ($withLimit) {
$this->query->removeOption('limit');
}
$list = $this->query
->where($where)
->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null)
@ -217,12 +217,12 @@ class HasMany extends Relation
->select();
// 组装模型数据
$data = [];
$data = [];
foreach ($list as $set) {
$key = $set->$foreignKey;
if ($this->withLimit && isset($data[$key]) && count($data[$key]) >= $this->withLimit) {
if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) {
continue;
}
@ -241,9 +241,9 @@ class HasMany extends Relation
*/
public function save($data, bool $replace = true)
{
$model = $this->make();
$model = $this->make($data);
return $model->replace($replace)->save($data) ? $model : false;
return $model->replace($replace)->save() ? $model : false;
}
/**

View File

@ -79,10 +79,6 @@ class HasManyThrough extends Relation
$this->baseQuery();
if ($this->withLimit) {
$this->query->limit($this->withLimit);
}
return $this->query->relation($subRelation)
->select()
->setParent(clone $this->parent);
@ -264,19 +260,24 @@ class HasManyThrough extends Relation
$throughKey = Str::snake(class_basename($this->model)) . "." . $this->throughKey;
}
$withLimit = $this->query->getOptions('limit');
if ($withLimit) {
$this->query->removeOption('limit');
}
$list = $this->query
->where($throughKey, 'in', $keys)
->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null)
->select();
// 组装模型数据
$data = [];
$keys = $throughList->column($this->foreignKey, $this->throughPk);
$data = [];
$keys = $throughList->column($this->foreignKey, $this->throughPk);
foreach ($list as $set) {
$key = $keys[$set->{$this->throughKey}];
if ($this->withLimit && isset($data[$key]) && count($data[$key]) >= $this->withLimit) {
if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) {
continue;
}

View File

@ -14,7 +14,6 @@ namespace think\model\relation;
use Closure;
use think\db\BaseQuery as Query;
use think\helper\Str;
use think\Model;
/**

View File

@ -12,7 +12,6 @@
namespace think\model\relation;
use Closure;
use think\helper\Str;
use think\Model;
/**

View File

@ -15,7 +15,6 @@ use Closure;
use think\Collection;
use think\db\BaseQuery as Query;
use think\db\exception\DbException as Exception;
use think\helper\Str;
use think\Model;
use think\model\Relation;
@ -77,10 +76,6 @@ class MorphMany extends Relation
$this->baseQuery();
if ($this->withLimit) {
$this->query->limit($this->withLimit);
}
return $this->query->relation($subRelation)
->select()
->setParent(clone $this->parent);
@ -258,6 +253,11 @@ class MorphMany extends Relation
$closure($this->getClosureType($closure));
}
$withLimit = $this->query->getOptions('limit');
if ($withLimit) {
$this->query->removeOption('limit');
}
$list = $this->query
->where($where)
->with($subRelation)
@ -266,11 +266,11 @@ class MorphMany extends Relation
$morphKey = $this->morphKey;
// 组装模型数据
$data = [];
$data = [];
foreach ($list as $set) {
$key = $set->$morphKey;
if ($this->withLimit && isset($data[$key]) && count($data[$key]) >= $this->withLimit) {
if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) {
continue;
}

View File

@ -14,7 +14,6 @@ namespace think\model\relation;
use Closure;
use think\db\BaseQuery as Query;
use think\db\exception\DbException as Exception;
use think\helper\Str;
use think\Model;
use think\model\Relation;
@ -260,8 +259,8 @@ class MorphOne extends Relation
*/
public function save($data, bool $replace = true)
{
$model = $this->make();
return $model->replace($replace)->save($data) ? $model : false;
$model = $this->make($data);
return $model->replace($replace)->save() ? $model : false;
}
/**

View File

@ -216,12 +216,7 @@ class MorphToMany extends BelongsToMany
}
$fields = $this->getQueryFields($tableName);
if ($this->withLimit) {
$this->query->limit($this->withLimit);
}
$query = $this->query
$query = $this->query
->field($fields)
->tableField(true, $table, 'pivot', 'pivot__');
@ -249,6 +244,11 @@ class MorphToMany extends BelongsToMany
$closure($this->getClosureType($closure));
}
$withLimit = $this->query->getOptions('limit');
if ($withLimit) {
$this->query->removeOption('limit');
}
// 预载入关联查询 支持嵌套预载入
$list = $this->belongsToManyQuery($this->foreignKey, $this->localKey, $where)
->with($subRelation)
@ -256,7 +256,7 @@ class MorphToMany extends BelongsToMany
->select();
// 组装模型数据
$data = [];
$data = [];
foreach ($list as $set) {
$pivot = [];
foreach ($set->getData() as $key => $val) {
@ -271,7 +271,7 @@ class MorphToMany extends BelongsToMany
$key = $pivot[$this->localKey];
if ($this->withLimit && isset($data[$key]) && count($data[$key]) >= $this->withLimit) {
if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) {
continue;
}
@ -300,10 +300,10 @@ class MorphToMany extends BelongsToMany
$model = new $this->model;
$id = $model->insertGetId($data);
}
} else if (is_numeric($data) || is_string($data)) {
} elseif (is_numeric($data) || is_string($data)) {
// 根据关联表主键直接写入中间表
$id = $data;
} else if ($data instanceof Model) {
} elseif ($data instanceof Model) {
// 根据关联表主键直接写入中间表
$id = $data->getKey();
}
@ -371,10 +371,10 @@ class MorphToMany extends BelongsToMany
{
if (is_array($data)) {
$id = $data;
} else if (is_numeric($data) || is_string($data)) {
} elseif (is_numeric($data) || is_string($data)) {
// 根据关联表主键直接写入中间表
$id = $data;
} else if ($data instanceof Model) {
} elseif ($data instanceof Model) {
// 根据关联表主键直接写入中间表
$id = $data->getKey();
}
@ -441,7 +441,7 @@ class MorphToMany extends BelongsToMany
if (!in_array($id, $current)) {
$this->attach($id, $attributes);
$changes['attached'][] = $id;
} else if (count($attributes) > 0 && $this->attach($id, $attributes)) {
} elseif (count($attributes) > 0 && $this->attach($id, $attributes)) {
$changes['updated'][] = $id;
}
}
@ -481,7 +481,7 @@ class MorphToMany extends BelongsToMany
{
if (is_array($map)) {
static::$morphMap = $merge && static::$morphMap
? $map + static::$morphMap : $map;
? $map + static::$morphMap : $map;
}
return static::$morphMap;

View File

@ -100,7 +100,7 @@ abstract class OneToOne extends Relation
$joinOn = $foreignKeyExp . '=' . $joinAlias . '.' . $this->localKey;
} else {
$foreignKeyExp = $this->foreignKey;
if (strpos($foreignKeyExp, '.') === false) {
@ -112,7 +112,7 @@ abstract class OneToOne extends Relation
if ($closure) {
// 执行闭包查询
$closure($this->getClosureType($closure));
$closure($this->getClosureType($closure, $query));
// 使用withField指定获取关联的字段
if ($this->withField) {
@ -201,9 +201,9 @@ abstract class OneToOne extends Relation
*/
public function save($data, bool $replace = true)
{
$model = $this->make();
$model = $this->make($data);
return $model->replace($replace)->save($data) ? $model : false;
return $model->replace($replace)->save() ? $model : false;
}
/**
@ -223,7 +223,6 @@ abstract class OneToOne extends Relation
return new $this->model($data);
}
/**
* 绑定关联表的属性到父模型属性
* @access public

View File

@ -6,4 +6,4 @@ if (!\class_exists('think\Exception')) {
if (!\class_exists('think\Facade')) {
require __DIR__ . '/Facade.php';
}
}

View File

@ -10,7 +10,7 @@
],
"require": {
"php": ">=7.1.0",
"topthink/framework": "^6.0"
"topthink/framework": "^6.0|^8.0"
},
"autoload": {
"psr-4": {

View File

@ -160,7 +160,7 @@ class TcpConnection extends ConnectionInterface
/**
* Context.
*
* @var array
* @var object|null
*/
public $context = null;

View File

@ -0,0 +1,320 @@
<?php
namespace Workerman\Events;
use RuntimeException;
use Swow\Coroutine;
use Swow\Signal;
use Swow\SignalException;
use Workerman\Worker;
use function getmypid;
use function max;
use function msleep;
use function stream_poll_one;
use function Swow\Sync\waitAll;
use const STREAM_POLLHUP;
use const STREAM_POLLIN;
use const STREAM_POLLNONE;
use const STREAM_POLLOUT;
class Swow implements EventInterface
{
/**
* All listeners for read timer
* @var array
*/
protected $_eventTimer = [];
/**
* All listeners for read event.
* @var array<Coroutine>
*/
protected $_readEvents = [];
/**
* All listeners for write event.
* @var array<Coroutine>
*/
protected $_writeEvents = [];
/**
* All listeners for signal.
* @var array<Coroutine>
*/
protected $_signalListener = [];
/**
* Get timer count.
*
* @return integer
*/
public function getTimerCount()
{
return \count($this->_eventTimer);
}
/**
* {@inheritdoc}
*/
public function delay(float $delay, $func, $args)
{
$t = (int) ($delay * 1000);
$t = max($t, 1);
$coroutine = Coroutine::run(function () use ($t, $func, $args): void {
msleep($t);
unset($this->_eventTimer[Coroutine::getCurrent()->getId()]);
try {
$func(...(array) $args);
} catch (\Throwable $e) {
Worker::stopAll(250, $e);
}
});
$timer_id = $coroutine->getId();
$this->_eventTimer[$timer_id] = $timer_id;
return $timer_id;
}
/**
* {@inheritdoc}
*/
public function repeat(float $interval, $func, $args)
{
$t = (int) ($interval * 1000);
$t = max($t, 1);
$coroutine = Coroutine::run(static function () use ($t, $func, $args): void {
while (true) {
msleep($t);
try {
$func(...(array) $args);
} catch (\Throwable $e) {
Worker::stopAll(250, $e);
}
}
});
$timer_id = $coroutine->getId();
$this->_eventTimer[$timer_id] = $timer_id;
return $timer_id;
}
/**
* {@inheritdoc}
*/
public function deleteTimer($timer_id)
{
if (isset($this->_eventTimer[$timer_id])) {
try {
(Coroutine::getAll()[$timer_id])->kill();
return true;
} finally {
unset($this->_eventTimer[$timer_id]);
}
}
return false;
}
/**
* {@inheritdoc}
*/
public function deleteAllTimer()
{
foreach ($this->_eventTimer as $timer_id) {
$this->deleteTimer($timer_id);
}
}
/**
* {@inheritdoc}
*/
public function onReadable($stream, $func)
{
if (isset($this->_readEvents[(int) $stream])) {
$this->offReadable($stream);
}
$this->_readEvents[(int) $stream] = Coroutine::run(function () use ($stream, $func): void {
try {
while (true) {
$rEvent = stream_poll_one($stream, STREAM_POLLIN | STREAM_POLLHUP);
if ($rEvent !== STREAM_POLLNONE) {
$func($stream);
}
if ($rEvent !== STREAM_POLLIN) {
$this->offReadable($stream, bySelf: true);
break;
}
}
} catch (RuntimeException) {
$this->offReadable($stream, bySelf: true);
}
});
return true;
}
/**
* {@inheritdoc}
*/
public function offReadable($stream, bool $bySelf = false)
{
$fd = (int) $stream;
if (!isset($this->_readEvents[$fd])) {
return;
}
if (!$bySelf) {
$coroutine = $this->_readEvents[$fd];
if (!$coroutine->isExecuting()) {
return;
}
$coroutine->kill();
}
unset($this->_readEvents[$fd]);
}
/**
* {@inheritdoc}
*/
public function onWritable($stream, $func)
{
if (isset($this->_writeEvents[(int) $stream])) {
$this->offWritable($stream);
}
$this->_writeEvents[(int) $stream] = Coroutine::run(function () use ($stream, $func): void {
try {
while (true) {
$rEvent = stream_poll_one($stream, STREAM_POLLOUT | STREAM_POLLHUP);
if ($rEvent !== STREAM_POLLNONE) {
$func($stream);
}
if ($rEvent !== STREAM_POLLOUT) {
$this->offWritable($stream, bySelf: true);
break;
}
}
} catch (RuntimeException) {
$this->offWritable($stream, bySelf: true);
}
});
return true;
}
/**
* {@inheritdoc}
*/
public function offWritable($stream, bool $bySelf = false)
{
$fd = (int) $stream;
if (!isset($this->_writeEvents[$fd])) {
return;
}
if (!$bySelf) {
$coroutine = $this->_writeEvents[$fd];
if (!$coroutine->isExecuting()) {
return;
}
$coroutine->kill();
}
unset($this->_writeEvents[$fd]);
}
/**
* {@inheritdoc}
*/
public function onSignal($signal, $func)
{
if (isset($this->_signalListener[$signal])) {
return false;
}
$coroutine = Coroutine::run(static function () use ($signal, $func): void {
try {
Signal::wait($signal);
$func($signal);
} catch (SignalException) {
}
});
$this->_signalListener[$signal] = $coroutine;
return true;
}
/**
* {@inheritdoc}
*/
public function offSignal($signal)
{
if (!isset($this->_signalListener[$signal])) {
return false;
}
$this->_signalListener[$signal]->kill();
unset($this->_signalListener[$signal]);
return true;
}
/**
* {@inheritdoc}
*/
public function run()
{
waitAll();
}
/**
* Destroy loop.
*
* @return void
*/
public function stop()
{
Coroutine::getMain()->kill();
Signal::kill(getmypid(), Signal::INT);
}
public function destroy()
{
$this->stop();
}
public function add($fd, $flag, $func, $args = [])
{
switch ($flag) {
case self::EV_SIGNAL:
return $this->onSignal($fd, $func);
case self::EV_TIMER:
case self::EV_TIMER_ONCE:
$method = self::EV_TIMER === $flag ? 'tick' : 'after';
if ($method === 'tick') {
return $this->repeat($fd, $func, $args);
} else {
return $this->delay($fd, $func, $args);
}
case self::EV_READ:
return $this->onReadable($fd, $func);
case self::EV_WRITE:
return $this->onWritable($fd, $func);
}
}
public function del($fd, $flag)
{
switch ($flag) {
case self::EV_SIGNAL:
return $this->offSignal($fd);
case self::EV_TIMER:
case self::EV_TIMER_ONCE:
return $this->deleteTimer($fd);
case self::EV_READ:
case self::EV_WRITE:
if ($flag === self::EV_READ) {
$this->offReadable($fd);
} else {
$this->offWritable($fd);
}
}
}
public function clearAllTimer()
{
$this->deleteAllTimer();
}
public function loop()
{
waitAll();
}
}

View File

@ -34,7 +34,7 @@ class Worker
*
* @var string
*/
const VERSION = '4.1.5';
const VERSION = '4.1.6';
/**
* Status starting.
@ -1557,6 +1557,7 @@ class Worker
elseif (0 === $pid) {
\srand();
\mt_srand();
static::$_gracefulStop = false;
if ($worker->reusePort) {
$worker->listen();
}
@ -1882,6 +1883,8 @@ class Worker
} else {
$sig = \SIGINT;
}
// Fix exit with status 2
usleep(50000);
foreach ($worker_pid_array as $worker_pid) {
\posix_kill($worker_pid, $sig);
if(!static::$_gracefulStop){

View File

@ -2,6 +2,7 @@
namespace yzh52521\EasyHttp;
/**
* @method static \yzh52521\EasyHttp\Request asJson()
* @method static \yzh52521\EasyHttp\Request asForm()
@ -27,27 +28,27 @@ namespace yzh52521\EasyHttp;
* @method static \yzh52521\EasyHttp\Request delay(int $seconds)
* @method static \yzh52521\EasyHttp\Request timeout(int $seconds)
* @method static \yzh52521\EasyHttp\Request concurrency(int $times)
* @method static \yzh52521\EasyHttp\Request client(string $method, string $url, array $options = [])
* @method static \yzh52521\EasyHttp\Request clientAsync(string $method, string $url, array $options = [])
* @method static \yzh52521\EasyHttp\Response client(string $method, string $url, array $options = [])
* @method static \yzh52521\EasyHttp\Response clientAsync(string $method, string $url, array $options = [])
* @method static \yzh52521\EasyHttp\Request removeBodyFormat()
*
* @method static \yzh52521\EasyHttp\Request get(string $url, array $query = [])
* @method static \yzh52521\EasyHttp\Request post(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Request patch(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Request put(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Request delete(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Request head(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Request options(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Response get(string $url, array $query = [])
* @method static \yzh52521\EasyHttp\Response post(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Response patch(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Response put(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Response delete(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Response head(string $url, array $data = [])
* @method static \yzh52521\EasyHttp\Response options(string $url, array $data = [])
*
* @method static \yzh52521\EasyHttp\Request getAsync(string $url, array|null $query = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request postAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request patchAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request putAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request deleteAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request headAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request optionsAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request multiAsync(array $promises, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Request wait()
* @method static \yzh52521\EasyHttp\Response getAsync(string $url, array|null $query = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Response postAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Response patchAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Response putAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Response deleteAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Response headAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \yzh52521\EasyHttp\Response optionsAsync(string $url, array|null $data = null, callable $success = null, callable $fail = null)
* @method static \GuzzleHttp\Pool multiAsync(array $promises, callable $success = null, callable $fail = null)
* @method static void wait()
*/
class Http extends Facade