Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 38 additions & 4 deletions .github/workflows/test-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:
composer update -o
- name: Run Test Cases
run: |
composer analyse src
composer analyse:types
composer analyse src/trigger
serializable-closure:
name: Test for Laravel Serializable Closure
runs-on: 'ubuntu-latest'
Expand Down Expand Up @@ -76,8 +75,9 @@ jobs:
composer update -o
- name: Run Test Cases
run: |
composer analyse src
composer analyse:types
composer analyse src/support
composer analyse:types types/Support
composer test:unit -- tests/Support/DispatchTest.php
carbon:
name: Test for Nesbot Carbon
runs-on: 'ubuntu-latest'
Expand Down Expand Up @@ -140,3 +140,37 @@ jobs:
run: |
composer analyse src
composer analyse:types
elasticsearch:
name: Test for Elasticsearch
runs-on: 'ubuntu-latest'
env:
PHP_VERSION: ${{ matrix.php-version }}
strategy:
matrix:
php-version: [ '8.4', '8.3', '8.2' ]
elasticsearch-version: [ '^9.0', '^8.0' ]
max-parallel: 10
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: redis, pdo, pdo_mysql, bcmath, swoole
ini-values: opcache.enable_cli=1
coverage: none
- name: Setup Packages
run: |
composer require elasticsearch/elasticsearch:${{ matrix.elasticsearch-version }} --no-update
composer update -o
- name: Run Test Cases
run: |
composer analyse src/elasticsearch
composer analyse src/sentry
composer analyse src/telescope-elasticsearch
composer analyse:types types/Sentry
composer test:unit -- --group=elasticsearch
composer test:unit -- --group=sentry
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"google/protobuf": "^3.21",
"google/recaptcha": "^1.2",
"guzzlehttp/uri-template": "^1.0",
"hyperf/elasticsearch": "~3.2.0",
"krowinski/php-mysql-replication": "^8.0 || ^9.0",
"laravel/serializable-closure": "^1.0 || ^2.0",
"league/commonmark": "^1.3 || ^2.0.2",
Expand All @@ -44,7 +43,7 @@
},
"require-dev": {
"aws/aws-sdk-php": "^3.235.5",
"elasticsearch/elasticsearch": "^7.0 || ^8.0",
"elasticsearch/elasticsearch": "^8.0 || ^9.0",
"ergebnis/composer-normalize": "^2.43",
"hashids/hashids": "^4.1 || ^5.0",
"huangdijia/php-coding-standard": "^2.4",
Expand Down
2 changes: 1 addition & 1 deletion src/elasticsearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"pull-request": "https://github.com/friendsofhyperf/components/pulls"
},
"require": {
"elasticsearch/elasticsearch": "^8.0",
"elasticsearch/elasticsearch": "^8.0 || ^9.0",
"hyperf/config": "~3.2.0",
"hyperf/context": "~3.2.0",
"hyperf/guzzle": "~3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"symfony/polyfill-php85": "^1.33"
},
"suggest": {
"elasticsearch/elasticsearch": "Required to use the elasticsearch client (^7.0|^8.0).",
"elasticsearch/elasticsearch": "Required to use the elasticsearch client (^8.0 || ^9.0).",
"hyperf/amqp": "Required to use the amqp event (~3.2.0).",
"hyperf/crontab": "Required to use the crontab event (~3.2.0).",
"hyperf/database": "Required to use the crontab event (~3.2.0).",
Expand Down
15 changes: 1 addition & 14 deletions src/sentry/src/Tracing/Aspect/ElasticsearchAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,7 @@
class ElasticsearchAspect extends AbstractAspect
{
public array $classes = [
// v7.x
'Elasticsearch\Client::bulk',
'Elasticsearch\Client::count',
'Elasticsearch\Client::create',
'Elasticsearch\Client::get',
'Elasticsearch\Client::getSource',
'Elasticsearch\Client::index',
'Elasticsearch\Client::mget',
'Elasticsearch\Client::msearch',
'Elasticsearch\Client::scroll',
'Elasticsearch\Client::search',
'Elasticsearch\Client::update',
'Elasticsearch\Client::updateByQuery',
// v8.x
// v8.x+
'Elastic\Elasticsearch\Traits\ClientEndpointsTrait::bulk',
'Elastic\Elasticsearch\Traits\ClientEndpointsTrait::count',
'Elastic\Elasticsearch\Traits\ClientEndpointsTrait::create',
Expand Down
2 changes: 1 addition & 1 deletion src/telescope-elasticsearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"hyperf/stringable": "~3.2.0"
},
"suggest": {
"elasticsearch/elasticsearch": "Required to use Elasticsearch Client.(^7.17.0||^8.8.0)"
"elasticsearch/elasticsearch": "Required to use Elasticsearch Client (^8.0 || ^9.0)."
},
"autoload": {
"psr-4": {
Expand Down