Compare commits

...

6 Commits

Author SHA1 Message Date
李东云
a46659f62b chore(release): 1.0.0-alpha.11 2023-10-17 02:55:37 +00:00
李东云
f80da66185 ci(docker): 兼容 ext-redis:6.0
Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
2023-10-17 10:55:26 +08:00
李东云
4e5b0fdbb4 chore(release): 1.0.0-alpha.10 2023-10-16 09:36:18 +00:00
李东云
17c0518680 feat(rest): 增加多表关联的兼容
Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
2023-10-16 17:35:30 +08:00
李东云
37d42c17cc build(composer): 更新依赖
Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
2023-10-16 17:34:24 +08:00
李东云
12e99604c9 build(script): root 用户可以使用 composer
Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
2023-10-16 17:31:24 +08:00
7 changed files with 68 additions and 35 deletions

1
.idea/HDK-Core.iml generated
View File

@@ -158,6 +158,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/cooper/hyperf-pest" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/clock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php83" />
<excludeFolder url="file://$MODULE_DIR$/runtime" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@@ -1,4 +1,24 @@
# 版本更新日志
## [1.0.0-alpha.11](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2023-10-17)
### 👷 Continuous Integration | CI 配置
* **docker:** 兼容 ext-redis:6.0 ([f80da66](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/commit/f80da661859333acff005241d2abcfd7c9f09c71))
## [1.0.0-alpha.10](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2023-10-16)
### 📦‍ Build System | 打包构建
* **composer:** 更新依赖 ([37d42c1](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/commit/37d42c17cc8707b17f1dd0fd8e0df5b8f4048bd2))
* **script:** root 用户可以使用 composer ([12e9960](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/commit/12e99604c99fee38aa82aa1fbc865201be09127f))
### ✨ Features | 新功能
* **rest:** 增加多表关联的兼容 ([17c0518](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/commit/17c051868026981031abf3e88e86f7475ce06807))
## [1.0.0-alpha.9](http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2023-10-13)

View File

@@ -1 +1 @@
1.0.0-alpha.9
1.0.0-alpha.11

View File

@@ -16,7 +16,7 @@
],
"require": {
"php": "^8.1",
"ext-redis": "^5.3",
"ext-redis": "^5.3|^6.0",
"ext-swoole": "*",
"composer/composer": ">=2.0",
"ergebnis/http-method": "^2.2",
@@ -88,7 +88,20 @@
"Singularity\\HDK\\Test\\Core\\": "tests/"
}
},
"minimum-stability": "dev",
"minimum-stability": "alpha",
"archive": {
"exclude": [
".idea",
"tests",
"scripts",
"Dockerfile",
".gitignore",
".php-cs-fixer.*",
".phpunit.result.cache",
"phpstan.dist.neon",
"phpunit.xml"
]
},
"prefer-stable": true,
"scripts": {
"post-root-package-install": [],
@@ -116,5 +129,5 @@
"url": "https://mirrors.aliyun.com/composer/"
}
},
"version": "1.0.0-alpha.9"
"version": "1.0.0-alpha.11"
}

56
composer.lock generated
View File

@@ -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": "f95b30b6d8449f4f5dbb8d4eb6d2ce26",
"content-hash": "62f0f2fe99d4e03fb859cd27fbc9e169",
"packages": [
{
"name": "composer/ca-bundle",
@@ -2291,16 +2291,16 @@
},
{
"name": "hyperf/redis",
"version": "v3.0.37",
"version": "v3.0.39",
"source": {
"type": "git",
"url": "https://github.com/hyperf/redis.git",
"reference": "270720a8fe23ca4807ac03eaad9f888f19c945f8"
"reference": "104366a4da9639e148ffc1230c5b61c81cbf6d78"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hyperf/redis/zipball/270720a8fe23ca4807ac03eaad9f888f19c945f8",
"reference": "270720a8fe23ca4807ac03eaad9f888f19c945f8",
"url": "https://api.github.com/repos/hyperf/redis/zipball/104366a4da9639e148ffc1230c5b61c81cbf6d78",
"reference": "104366a4da9639e148ffc1230c5b61c81cbf6d78",
"shasum": "",
"mirrors": [
{
@@ -2310,7 +2310,7 @@
]
},
"require": {
"ext-redis": "<6.0",
"ext-redis": "^5.0|^6.0",
"hyperf/contract": "~3.0.0",
"hyperf/pool": "~3.0.0",
"hyperf/support": "~3.0.0",
@@ -2355,7 +2355,7 @@
"pull-request": "https://github.com/hyperf/hyperf/pulls",
"source": "https://github.com/hyperf/hyperf"
},
"time": "2023-09-19T01:50:18+00:00"
"time": "2023-10-12T13:10:56+00:00"
},
{
"name": "hyperf/resource",
@@ -6522,16 +6522,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.34.1",
"version": "v3.35.1",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "98bf1b1068b4ceddbbc2a2b70b67a5e380add9e3"
"reference": "ec1ccc264994b6764882669973ca435cf05bab08"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/98bf1b1068b4ceddbbc2a2b70b67a5e380add9e3",
"reference": "98bf1b1068b4ceddbbc2a2b70b67a5e380add9e3",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/ec1ccc264994b6764882669973ca435cf05bab08",
"reference": "ec1ccc264994b6764882669973ca435cf05bab08",
"shasum": "",
"mirrors": [
{
@@ -6570,8 +6570,6 @@
"phpspec/prophecy": "^1.16",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5",
"phpunitgoodpractices/polyfill": "^1.6",
"phpunitgoodpractices/traits": "^1.9.2",
"symfony/phpunit-bridge": "^6.2.3",
"symfony/yaml": "^5.4 || ^6.0"
},
@@ -6611,7 +6609,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.34.1"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.35.1"
},
"funding": [
{
@@ -6619,7 +6617,7 @@
"type": "github"
}
],
"time": "2023-10-03T23:51:05+00:00"
"time": "2023-10-12T13:47:26+00:00"
},
{
"name": "guzzlehttp/guzzle",
@@ -7482,16 +7480,16 @@
},
{
"name": "hyperf/server",
"version": "v3.0.37",
"version": "v3.0.39",
"source": {
"type": "git",
"url": "https://github.com/hyperf/server.git",
"reference": "3702c58c3617ec2e845e1f2d13a903b92be63100"
"reference": "b8e305dc7583762a5e3815b1da984e7cf2f13388"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hyperf/server/zipball/3702c58c3617ec2e845e1f2d13a903b92be63100",
"reference": "3702c58c3617ec2e845e1f2d13a903b92be63100",
"url": "https://api.github.com/repos/hyperf/server/zipball/b8e305dc7583762a5e3815b1da984e7cf2f13388",
"reference": "b8e305dc7583762a5e3815b1da984e7cf2f13388",
"shasum": "",
"mirrors": [
{
@@ -7548,7 +7546,7 @@
"pull-request": "https://github.com/hyperf/hyperf/pulls",
"source": "https://github.com/hyperf/hyperf"
},
"time": "2023-09-19T01:50:18+00:00"
"time": "2023-10-08T15:14:41+00:00"
},
{
"name": "hyperf/session",
@@ -9250,12 +9248,12 @@
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "85afa852eeecec97cec35d987dcfbc602c025620"
"reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/85afa852eeecec97cec35d987dcfbc602c025620",
"reference": "85afa852eeecec97cec35d987dcfbc602c025620",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/efd339340c840237fad050f3ea6fd8bbbbfc7ed6",
"reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6",
"shasum": "",
"mirrors": [
{
@@ -9593,7 +9591,7 @@
"openmage/magento-lts": "<=19.5|>=20,<=20.1",
"opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2",
"orchid/platform": ">=9,<9.4.4|>=14.0.0.0-alpha4,<14.5",
"oro/commerce": ">=4.1,<5.0.6",
"oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1",
"oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7",
"oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8",
"oxid-esales/oxideshop-ce": "<4.5",
@@ -9714,7 +9712,7 @@
"slim/slim": "<2.6",
"slub/slub-events": "<3.0.3",
"smarty/smarty": "<3.1.48|>=4,<4.3.1",
"snipe/snipe-it": "<=6.0.14",
"snipe/snipe-it": "<=6.2.2",
"socalnick/scn-social-auth": "<1.15.2",
"socialiteproviders/steam": "<1.1",
"spatie/browsershot": "<3.57.4",
@@ -9929,7 +9927,7 @@
"type": "tidelift"
}
],
"time": "2023-10-06T19:04:00+00:00"
"time": "2023-10-11T21:04:21+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -12168,7 +12166,7 @@
}
],
"aliases": [],
"minimum-stability": "dev",
"minimum-stability": "alpha",
"stability-flags": {
"roave/security-advisories": 20
},
@@ -12176,11 +12174,11 @@
"prefer-lowest": false,
"platform": {
"php": "^8.1",
"ext-redis": "^5.3",
"ext-redis": "^5.3|^6.0",
"ext-swoole": "*",
"ext-libxml": "*",
"ext-dom": "*"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@@ -2,7 +2,7 @@
docker run \
--pull always \
-ti --rm --name "hyperf-development-kit" \
-ti --rm --name "hdk-core" \
-w "/srv/www" \
-v "$(pwd)":/srv/www \
-v ~/.ssh:/root/.ssh \

View File

@@ -12,6 +12,7 @@ namespace Singularity\HDK\Core\Traits;
use Closure;
use Hyperf\Contract\LengthAwarePaginatorInterface;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\Stringable\Str;
@@ -53,7 +54,7 @@ trait RestfulList
protected function responseFormatter(
array $options,
Builder $builder,
Builder|Relation $builder,
?Closure $filter = null
) {
$perPage = $options['size'] ?? null;