Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 54e1b44

Browse files
Featrue/open api (#3)
add openapi and docs
1 parent bb6c486 commit 54e1b44

File tree

81 files changed

+10640
-1637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+10640
-1637
lines changed

‎.openapi.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use Astral\Serialize\OpenApi\Storage\OpenAPI\ServersStorage;
4+
5+
return [
6+
'title' => 'API Docs',
7+
8+
'description' => 'API Docs description.',
9+
10+
/**
11+
* 向全局头部参数存储中添加一个的头部参数。
12+
* @param string $name
13+
* @param string $example
14+
* @param string $description
15+
*/
16+
'headers' => [
17+
18+
],
19+
20+
'service' => [
21+
new ServersStorage('http://127.0.0.1','默认环境'),
22+
],
23+
];

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
# Languages
66

7-
- [Complete documen-English](./docs/en/README.md)
8-
- [完整文档-中文](./docs/zh/README.md)
7+
- [Complete documen-English](https://astrals-organization.gitbook.io/php-serialize/php-serialize-en)
8+
- [完整文档-中文](https://astrals-organization.gitbook.io/php-serialize)
99

1010
# php-serialize
1111

‎benchmarks/SerializeBench.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function setupObject(): void
8383
Revs(500),
8484
Iterations(5),
8585
BeforeMethods([ 'setupObjectCreation']),
86-
Assert('mode(variant.time.avg) < 140 microseconds +/- 5%')
86+
Assert('mode(variant.time.avg) < 120 microseconds +/- 5%')
8787
]
8888
public function benchObjectCreation(): void
8989
{
@@ -94,7 +94,7 @@ public function benchObjectCreation(): void
9494
Revs(5000),
9595
Iterations(5),
9696
BeforeMethods([ 'setupObjectCreation']),
97-
Assert('mode(variant.time.avg) < 350 microseconds +/- 5%')
97+
Assert('mode(variant.time.avg) < 300 microseconds +/- 5%')
9898
]
9999
public function benchObjectCreationWithoutCache(): void
100100
{
@@ -106,7 +106,7 @@ public function benchObjectCreationWithoutCache(): void
106106
Revs(500),
107107
Iterations(5),
108108
BeforeMethods(['setupObject']),
109-
Assert('mode(variant.time.avg) < 80 microseconds +/- 5%')
109+
Assert('mode(variant.time.avg) < 65 microseconds +/- 5%')
110110
]
111111
public function benchObjectToArray(): void
112112
{
@@ -117,7 +117,7 @@ public function benchObjectToArray(): void
117117
Revs(5000),
118118
Iterations(5),
119119
BeforeMethods(['setupObject']),
120-
Assert('mode(variant.time.avg) < 270 microseconds +/- 5%')
120+
Assert('mode(variant.time.avg) < 230 microseconds +/- 5%')
121121
]
122122
public function benchObjectToArrayWithoutCache(): void
123123
{

‎composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"phpdocumentor/reflection-docblock": "^5.5",
2323
"phpdocumentor/reflection": "^6.0",
2424
"fakerphp/faker": "^1.23",
25-
"psr/simple-cache": "^3.0"
25+
"psr/simple-cache": "^3.0",
26+
"symfony/console": "^6.4"
2627
},
2728
"require-dev" : {
2829
"phpstan/phpstan": "^2.0.2",
@@ -41,6 +42,9 @@
4142
"config": {
4243
"allow-plugins": {
4344
"pestphp/pest-plugin": true
45+
},
46+
"platform": {
47+
"php": "8.1.32"
4448
}
4549
}
4650
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /