Skip to content

Commit 6e2c5d4

Browse files
Copilothuangdijia
andauthored
Upgrade elasticsearch/elasticsearch dependency from ^7.0||^8.0 to ^8.0||^9.0 (#1012)
* Initial plan * Upgrade elasticsearch/elasticsearch dependency from ^7.0||^8.0 to ^8.0||^9.0 Co-authored-by: huangdijia <[email protected]> * Remove Elasticsearch v7.x support from ElasticsearchAspect Co-authored-by: huangdijia <[email protected]> * Add Elasticsearch dependency testing to test-components workflow Co-authored-by: huangdijia <[email protected]> * 删除对 hyperf/elasticsearch 依赖的支持 * 更新 Elasticsearch 相关的测试用例和分析命令 * 更新测试用例以分析特定目录并添加单元测试 --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: huangdijia <[email protected]>
1 parent b485c6c commit 6e2c5d4

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"symfony/polyfill-php85": "^1.33"
3737
},
3838
"suggest": {
39-
"elasticsearch/elasticsearch": "Required to use the elasticsearch client (^7.0|^8.0).",
39+
"elasticsearch/elasticsearch": "Required to use the elasticsearch client (^8.0 || ^9.0).",
4040
"hyperf/amqp": "Required to use the amqp event (~3.2.0).",
4141
"hyperf/crontab": "Required to use the crontab event (~3.2.0).",
4242
"hyperf/database": "Required to use the crontab event (~3.2.0).",

src/Tracing/Aspect/ElasticsearchAspect.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,7 @@
2222
class ElasticsearchAspect extends AbstractAspect
2323
{
2424
public array $classes = [
25-
// v7.x
26-
'Elasticsearch\Client::bulk',
27-
'Elasticsearch\Client::count',
28-
'Elasticsearch\Client::create',
29-
'Elasticsearch\Client::get',
30-
'Elasticsearch\Client::getSource',
31-
'Elasticsearch\Client::index',
32-
'Elasticsearch\Client::mget',
33-
'Elasticsearch\Client::msearch',
34-
'Elasticsearch\Client::scroll',
35-
'Elasticsearch\Client::search',
36-
'Elasticsearch\Client::update',
37-
'Elasticsearch\Client::updateByQuery',
38-
// v8.x
25+
// v8.x+
3926
'Elastic\Elasticsearch\Traits\ClientEndpointsTrait::bulk',
4027
'Elastic\Elasticsearch\Traits\ClientEndpointsTrait::count',
4128
'Elastic\Elasticsearch\Traits\ClientEndpointsTrait::create',

0 commit comments

Comments
 (0)