Skip to content

Commit 1be95d0

Browse files
luizmanhanihuangdijialimingxinleoyansongdaalbertcht
authored
Bump hyperf 3.1 (#27)
* [3.1]Bumps dependencies (#5796) Co-authored-by: 李铭昕 <[email protected]> * Upgrade hyperf packages to version `~3.1.0` (#5801) * Bumps `phpunit` to `10.x` (#5802) Co-authored-by: 李铭昕 <[email protected]> * Remove redundant `setAccessible` methods (#5811) * Remove deprecated codes (#5812) * Removed the deprecated code for metric. (#5847) * Use `StrCache` instead of `Str` in special cases. (#5866) * [feat] Support buffer mechanism in standalone process of metric (#6030) Co-authored-by: 李铭昕 <[email protected]> * Fix the bug that cannot stop the command from terminating gracefully (#6090) * Upgrade actions/checkout to v4 (#6159) * Adds `metric.enable_command_metric` switch (#6272) * Changed the `branch-alias` of all components to `3.1-dev`. (#6320) * Update grafana.json (#6531) * Added comment (#6607) * Format code by the latest `cs-fixer`. (#6617) * Added composer.json normalize support (#6887) * Format code (#6994) * Improve actions (#7088) * update github actions for all components. (#7090) --------- Co-authored-by: Deeka Wong <[email protected]> Co-authored-by: 李铭昕 <[email protected]> Co-authored-by: yansongda <[email protected]> Co-authored-by: Albert Chen <[email protected]> Co-authored-by: 宣言就是Siam <[email protected]>
1 parent b8867b9 commit 1be95d0

Some content is hidden

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

64 files changed

+104
-22
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Close Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened ]
6+
7+
jobs:
8+
run:
9+
uses: hyperf/.github/.github/workflows/close-pull-request.yml@master

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Release
8+
9+
jobs:
10+
release:
11+
uses: hyperf/.github/.github/workflows/release.yml@master

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
"hyperf/guzzle": "~3.1.0",
1919
"hyperf/support": "~3.1.0",
2020
"hyperf/utils": "~3.1.0",
21-
"psr/container": "^1.0|^2.0",
22-
"promphp/prometheus_client_php": "^2.7",
21+
"psr/container": "^1.0 || ^2.0",
2322
"psr/event-dispatcher": "^1.0",
24-
"psr/http-message": "^1.0|^2.0"
23+
"psr/http-message": "^1.0 || ^2.0"
2524
},
2625
"require-dev": {
2726
"friendsofphp/php-cs-fixer": "^3.21",
@@ -44,15 +43,17 @@
4443
"swoole/ide-helper": "^5.0"
4544
},
4645
"suggest": {
47-
"influxdb/influxdb-php": "Required to use InfluxDB driver.",
4846
"hyperf/di": "Required to use annotations.",
4947
"hyperf/event": "Required to use listeners for default metrics.",
48+
"hyperf/http-server": "Required to capture routes in middleware.",
5049
"hyperf/process": "Required to use standalone process, or you have to roll your own",
5150
"hyperf/retry": "Required to use back-off retry implementation.",
52-
"hyperf/http-server": "Required to capture routes in middleware.",
51+
"influxdb/influxdb-php": "Required to use InfluxDB driver.",
5352
"promphp/prometheus_client_php": "Required to use Prometheus driver.(2.2.*)",
5453
"slickdeals/statsd": "Required to use StatdD driver."
5554
},
55+
"minimum-stability": "dev",
56+
"prefer-stable": true,
5657
"autoload": {
5758
"psr-4": {
5859
"Hyperf\\Metric\\": "src/"
@@ -71,8 +72,6 @@
7172
"analyse": "phpstan analyse --memory-limit=-1 -l 5 -c phpstan.neon",
7273
"rector": "rector process --clear-cache"
7374
},
74-
"minimum-stability": "dev",
75-
"prefer-stable": true,
7675
"config": {
7776
"optimize-autoloader": true,
7877
"sort-packages": true,

grafana.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@
397397
{
398398
"expr": "sum([[app_name]]_event_num{instance=~'$instance'})",
399399
"format": "time_series",
400-
"instant": true,
400+
"instant": false,
401401
"intervalFactor": 1,
402402
"refId": "A"
403403
}
@@ -484,7 +484,7 @@
484484
{
485485
"expr": "sum([[app_name]]_coroutine_num{instance=~'$instance'})",
486486
"format": "time_series",
487-
"instant": true,
487+
"instant": false,
488488
"intervalFactor": 1,
489489
"refId": "A"
490490
}
@@ -567,7 +567,7 @@
567567
{
568568
"expr": "sum([[app_name]]_connection_num{instance=~'$instance'})",
569569
"format": "time_series",
570-
"instant": true,
570+
"instant": false,
571571
"intervalFactor": 1,
572572
"refId": "A"
573573
}
@@ -729,7 +729,7 @@
729729
{
730730
"expr": "sum([[app_name]]_tasking_num{instance=~'$instance'})",
731731
"format": "time_series",
732-
"instant": true,
732+
"instant": false,
733733
"intervalFactor": 1,
734734
"refId": "A"
735735
}
@@ -895,7 +895,7 @@
895895
{
896896
"expr": "sum([[app_name]]_timer_num{instance=~'$instance'})",
897897
"format": "time_series",
898-
"instant": true,
898+
"instant": false,
899899
"intervalFactor": 1,
900900
"refId": "A"
901901
}

publish/metric.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
1111
*/
1212
use Hyperf\Metric\Adapter\Prometheus\Constants;
13+
use Hyperf\Metric\Adapter\Prometheus\MetricFactory;
1314

1415
use function Hyperf\Support\env;
1516

@@ -25,7 +26,7 @@
2526
'buffer_size' => env('METRIC_BUFFER_SIZE', 200),
2627
'metric' => [
2728
'prometheus' => [
28-
'driver' => Hyperf\Metric\Adapter\Prometheus\MetricFactory::class,
29+
'driver' => MetricFactory::class,
2930
'mode' => Constants::SCRAPE_MODE,
3031
'namespace' => env('APP_NAME', 'skeleton'),
3132
'redis_config' => env('PROMETHEUS_REDIS_CONFIG', 'default'),

src/Adapter/InfluxDB/MetricFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
1111
*/
12+
1213
namespace Hyperf\Metric\Adapter\InfluxDB;
1314

1415
use Hyperf\Contract\ConfigInterface;

src/Adapter/NoOp/Counter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
1111
*/
12+
1213
namespace Hyperf\Metric\Adapter\NoOp;
1314

1415
use Hyperf\Metric\Contract\CounterInterface;

src/Adapter/NoOp/Gauge.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
1111
*/
12+
1213
namespace Hyperf\Metric\Adapter\NoOp;
1314

1415
use Hyperf\Metric\Contract\GaugeInterface;

src/Adapter/NoOp/Histogram.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
1111
*/
12+
1213
namespace Hyperf\Metric\Adapter\NoOp;
1314

1415
use Hyperf\Metric\Contract\HistogramInterface;

src/Adapter/NoOp/MetricFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
1111
*/
12+
1213
namespace Hyperf\Metric\Adapter\NoOp;
1314

1415
use Hyperf\Coordinator\Constants;

0 commit comments

Comments
 (0)