Skip to content

Bump hyperf 3.1 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a00abe0
[3.1]Bumps dependencies (#5796)
huangdijia Jun 6, 2023
3efff1d
Upgrade hyperf packages to version `~3.1.0` (#5801)
huangdijia Jun 6, 2023
ac45dbb
Bumps `phpunit` to `10.x` (#5802)
huangdijia Jun 7, 2023
f412e51
Remove redundant `setAccessible` methods (#5811)
huangdijia Jun 7, 2023
e8060a7
Remove deprecated codes (#5812)
huangdijia Jun 7, 2023
ba3ce0d
Removed the deprecated code for metric. (#5847)
yansongda Jun 18, 2023
1de58b1
Use `StrCache` instead of `Str` in special cases. (#5866)
limingxinleo Jun 20, 2023
5668bd5
[feat] Support buffer mechanism in standalone process of metric (#6030)
albertcht Aug 17, 2023
382a49d
Fix the bug that cannot stop the command from terminating gracefully …
huangdijia Aug 28, 2023
884b02e
Merge branch 'master' into 3.1-merge
limingxinleo Aug 30, 2023
2f44242
Upgrade actions/checkout to v4 (#6159)
huangdijia Sep 19, 2023
a3809a5
Merge branch 'master' into 3.1
limingxinleo Sep 22, 2023
9d7abda
Adds `metric.enable_command_metric` switch (#6272)
huangdijia Nov 9, 2023
6df2909
Merge branch 'master' into 3.1
limingxinleo Nov 10, 2023
0f6c3c6
Changed the `branch-alias` of all components to `3.1-dev`. (#6320)
limingxinleo Nov 24, 2023
ce27c2a
Update grafana.json (#6531)
huangdijia Feb 18, 2024
f160712
Added comment (#6607)
xuanyanwow Mar 20, 2024
cf828c0
Format code by the latest `cs-fixer`. (#6617)
limingxinleo Mar 23, 2024
c9c2770
Added composer.json normalize support (#6887)
huangdijia Jun 17, 2024
039051e
Format code (#6994)
limingxinleo Aug 8, 2024
396d961
Improve actions (#7088)
huangdijia Sep 25, 2024
480685b
update github actions for all components. (#7090)
limingxinleo Sep 25, 2024
e2d9948
Resolving merge conflicts.
luizmanhani Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/close-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Close Pull Request

on:
pull_request_target:
types: [ opened ]

jobs:
run:
uses: hyperf/.github/.github/workflows/close-pull-request.yml@master
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Release

jobs:
release:
uses: hyperf/.github/.github/workflows/release.yml@master
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
"hyperf/guzzle": "~3.1.0",
"hyperf/support": "~3.1.0",
"hyperf/utils": "~3.1.0",
"psr/container": "^1.0|^2.0",
"promphp/prometheus_client_php": "^2.7",
"psr/container": "^1.0 || ^2.0",
"psr/event-dispatcher": "^1.0",
"psr/http-message": "^1.0|^2.0"
"psr/http-message": "^1.0 || ^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.21",
Expand All @@ -44,15 +43,17 @@
"swoole/ide-helper": "^5.0"
},
"suggest": {
"influxdb/influxdb-php": "Required to use InfluxDB driver.",
"hyperf/di": "Required to use annotations.",
"hyperf/event": "Required to use listeners for default metrics.",
"hyperf/http-server": "Required to capture routes in middleware.",
"hyperf/process": "Required to use standalone process, or you have to roll your own",
"hyperf/retry": "Required to use back-off retry implementation.",
"hyperf/http-server": "Required to capture routes in middleware.",
"influxdb/influxdb-php": "Required to use InfluxDB driver.",
"promphp/prometheus_client_php": "Required to use Prometheus driver.(2.2.*)",
"slickdeals/statsd": "Required to use StatdD driver."
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Hyperf\\Metric\\": "src/"
Expand All @@ -71,8 +72,6 @@
"analyse": "phpstan analyse --memory-limit=-1 -l 5 -c phpstan.neon",
"rector": "rector process --clear-cache"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"optimize-autoloader": true,
"sort-packages": true,
Expand Down
10 changes: 5 additions & 5 deletions grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
{
"expr": "sum([[app_name]]_event_num{instance=~'$instance'})",
"format": "time_series",
"instant": true,
"instant": false,
"intervalFactor": 1,
"refId": "A"
}
Expand Down Expand Up @@ -484,7 +484,7 @@
{
"expr": "sum([[app_name]]_coroutine_num{instance=~'$instance'})",
"format": "time_series",
"instant": true,
"instant": false,
"intervalFactor": 1,
"refId": "A"
}
Expand Down Expand Up @@ -567,7 +567,7 @@
{
"expr": "sum([[app_name]]_connection_num{instance=~'$instance'})",
"format": "time_series",
"instant": true,
"instant": false,
"intervalFactor": 1,
"refId": "A"
}
Expand Down Expand Up @@ -729,7 +729,7 @@
{
"expr": "sum([[app_name]]_tasking_num{instance=~'$instance'})",
"format": "time_series",
"instant": true,
"instant": false,
"intervalFactor": 1,
"refId": "A"
}
Expand Down Expand Up @@ -895,7 +895,7 @@
{
"expr": "sum([[app_name]]_timer_num{instance=~'$instance'})",
"format": "time_series",
"instant": true,
"instant": false,
"intervalFactor": 1,
"refId": "A"
}
Expand Down
3 changes: 2 additions & 1 deletion publish/metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/
use Hyperf\Metric\Adapter\Prometheus\Constants;
use Hyperf\Metric\Adapter\Prometheus\MetricFactory;

use function Hyperf\Support\env;

Expand All @@ -25,7 +26,7 @@
'buffer_size' => env('METRIC_BUFFER_SIZE', 200),
'metric' => [
'prometheus' => [
'driver' => Hyperf\Metric\Adapter\Prometheus\MetricFactory::class,
'driver' => MetricFactory::class,
'mode' => Constants::SCRAPE_MODE,
'namespace' => env('APP_NAME', 'skeleton'),
'redis_config' => env('PROMETHEUS_REDIS_CONFIG', 'default'),
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/InfluxDB/MetricFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\InfluxDB;

use Hyperf\Contract\ConfigInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/NoOp/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\NoOp;

use Hyperf\Metric\Contract\CounterInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/NoOp/Gauge.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\NoOp;

use Hyperf\Metric\Contract\GaugeInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/NoOp/Histogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\NoOp;

use Hyperf\Metric\Contract\HistogramInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/NoOp/MetricFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\NoOp;

use Hyperf\Coordinator\Constants;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

class Constants
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

use Hyperf\Metric\Contract\CounterInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/Gauge.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

use Hyperf\Metric\Contract\GaugeInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/Histogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

use Hyperf\Metric\Contract\HistogramInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/MetricFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

use GuzzleHttp\Exception\GuzzleException;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

use Hyperf\Codec\Json;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Prometheus/RedisStorageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\Prometheus;

use Hyperf\Contract\ConfigInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/RemoteProxy/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\RemoteProxy;

use Hyperf\Context\ApplicationContext;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/RemoteProxy/Gauge.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\RemoteProxy;

use Hyperf\Context\ApplicationContext;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/RemoteProxy/Histogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\RemoteProxy;

use Hyperf\Context\ApplicationContext;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/RemoteProxy/MetricCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Metric\Adapter\RemoteProxy;

use Hyperf\Metric\Contract\MetricCollectorInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/RemoteProxy/MetricCollectorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Metric\Adapter\RemoteProxy;

use Hyperf\Contract\ConfigInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/RemoteProxy/MetricFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\RemoteProxy;

use Hyperf\Metric\Contract\CounterInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/StatsD/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\StatsD;

use Domnikl\Statsd\Client;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/StatsD/Gauge.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\StatsD;

use Domnikl\Statsd\Client;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/StatsD/Histogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\StatsD;

use Domnikl\Statsd\Client;
Expand Down
1 change: 1 addition & 0 deletions src/Adapter/StatsD/MetricFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Adapter\StatsD;

use Domnikl\Statsd\Client;
Expand Down
1 change: 1 addition & 0 deletions src/Annotation/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Annotation;

use Attribute;
Expand Down
1 change: 1 addition & 0 deletions src/Annotation/Histogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Annotation;

use Attribute;
Expand Down
1 change: 1 addition & 0 deletions src/Aspect/CounterAnnotationAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Aspect;

use Hyperf\Di\Aop\AbstractAspect;
Expand Down
1 change: 1 addition & 0 deletions src/Aspect/HistogramAnnotationAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Aspect;

use Hyperf\Di\Aop\AbstractAspect;
Expand Down
1 change: 1 addition & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric;

use Domnikl\Statsd\Connection;
Expand Down
1 change: 1 addition & 0 deletions src/Contract/CounterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Contract;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Contract/GaugeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Contract;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Contract/HistogramInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Contract;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Contract/MetricCollectorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Metric\Contract;

interface MetricCollectorInterface
Expand Down
1 change: 1 addition & 0 deletions src/Contract/MetricFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Contract;

interface MetricFactoryInterface
Expand Down
1 change: 1 addition & 0 deletions src/CoroutineServerStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric;

use Hyperf\Contract\Arrayable;
Expand Down
1 change: 1 addition & 0 deletions src/Event/MetricFactoryReady.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
*/

namespace Hyperf\Metric\Event;

use Hyperf\Metric\Contract\MetricFactoryInterface;
Expand Down
Loading