Skip to content
Closed
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
5 changes: 4 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
elasticsearch: ['8.18.0', '9.0.0']
env:
BROADCAST_DRIVER: log
CACHE_DRIVER: redis
Expand All @@ -23,7 +26,7 @@ jobs:
# Docs: https://docs.github.com/en/actions/using-containerized-services
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.18.0
image: docker.elastic.co/elasticsearch/elasticsearch:${{ matrix.elasticsearch }}
env:
discovery.type: single-node
xpack.security.enabled: 'false'
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this `laravel-elasticsearch` package will be documented in this file.

## v5.4.2 - 2026-02-24

### Elasticsearch 9.x Compatibility

- **PHP client constraint:** Updated to `^8.17|^9.0` to support both Elasticsearch 8.x and 9.x PHP clients
- **CI matrix:** GitHub Actions now tests against both ES 8.18.0 and 9.0.0 (using official `docker.elastic.co` images)
- **Docker:** Local development uses ES 9.0.0 with official `docker.elastic.co` images
- **Verified compatibility:** Full test suite passes against ES 9.0.0 without code changes

### Deprecation Notice

- `force_source` highlighting parameter is deprecated since ES 8.11 and removed in ES 9.x. The parameter is still accepted for backward compatibility with ES 8.x, but will be ignored by ES 9.x servers

## v5.4.1 - 2026-02-23

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"illuminate/database": "^10.30|^11|^12",
"illuminate/events": "^10.0|^11|^12",
"illuminate/support": "^10.0|^11|^12",
"elasticsearch/elasticsearch": "^8.17",
"elasticsearch/elasticsearch": "^8.17|^9.0",
"spatie/ignition": "^1.15",
"pdphilip/omniterm": "^2"
},
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
services:
elasticsearch:
image: elasticsearch:8.18.0
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.0
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms1g -Xmx1g
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\"\\|\"status\":\"yellow\"'"]
Expand All @@ -17,7 +18,7 @@ services:
depends_on:
elasticsearch:
condition: service_healthy
image: kibana:8.18.0
image: docker.elastic.co/kibana/kibana:8.18.0
restart: unless-stopped
ports:
- "5601:5601"
Expand Down
2 changes: 1 addition & 1 deletion src/Query/Grammar/Concerns/CompilesOrders.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function compileHighlight(Builder $builder, mixed $highlight = []): ar
'boundary_scanner_locale',
'encoder',
'fragmenter',
'force_source',
'force_source', // @deprecated Removed in Elasticsearch 9.x. Only works with ES 8.x (deprecated since 8.11)
'fragment_offset',
'fragment_size',
'highlight_query',
Expand Down