Skip to content

Commit ff8d816

Browse files
committed
v3.1.0
1 parent f277a95 commit ff8d816

2 files changed

Lines changed: 42 additions & 39 deletions

File tree

.github/workflows/update-changelog.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,57 @@
22

33
All notable changes to this `laravel-opensearch` package will be documented in this file.
44

5-
## v3.1.0 - 2026-03-26
5+
## v3.1.0 - 2026-04-06
6+
7+
> **Future-proofing note:** After GitHub incorrectly shadow-banned my account (since reinstated with no
8+
> explanation beyond "it shouldn't happen again"), all packages are now mirrored to GitLab. GitHub
9+
> remains the home for issues, PRs, and community collaboration, but **Packagist downloads exclusively
10+
from GitLab** to ensure uninterrupted access to releases regardless of GitHub's actions.
611

712
This release is compatible with Laravel 11, 12 & 13
813

914
### Added
1015

11-
- **Laravel 13 support**
12-
- Composer test scripts for per-version testing: `composer test:l11`, `composer test:l12`, `composer test:l13`, `composer test:all`
16+
- **Laravel 13 support** (including 13.3 `HasCollection` compatibility)
17+
- **Query String Queries**`searchQueryString()`, `orSearchQueryString()`, `searchNotQueryString()`,
18+
`orSearchNotQueryString()` with full `QueryStringOptions` support -
19+
[Docs](https://opensearch.pdphilip.com/eloquent/query-string-queries)
20+
- **Track Total Hits**`withTrackTotalHits(bool|int|null)` to override the default 10k hit count cap
21+
- [Docs](https://opensearch.pdphilip.com/eloquent/the-base-model/#track-total-hits)
22+
- **Create or Fail**`createOrFail()` throws `BulkInsertQueryException` (409) on duplicate IDs
23+
instead of upserting - [Docs](https://opensearch.pdphilip.com/eloquent/saving-models/#create-or-fail)
24+
- **Set Refresh Flag**`withRefresh(true|false|'wait_for')` to control index refresh behavior on
25+
writes - [Docs](https://opensearch.pdphilip.com/eloquent/saving-models/#with-refresh)
26+
- **Create Only**`createOnly()` and `withOpType('create')` for dedupe insert semantics with
27+
per-document `_op_type` support
28+
- **Time-Ordered IDs**`GeneratesTimeOrderedIds` trait for sortable, chronologically-ordered
29+
20-character IDs - [Docs](https://opensearch.pdphilip.com/eloquent/the-base-model/#3-generatestimeorderedids-trait)
30+
- `QueryStringOptions` and `SimpleQueryStringOptions` classes
31+
- Composer test scripts: `composer test:l11`, `composer test:l12`, `composer test:l13`, `composer
32+
test:all`
33+
34+
### Fixed
35+
36+
- **QueryException** crash on `Undefined array key "error"` when OpenSearch returns responses without
37+
the expected `error.type` structure
38+
- **BulkInsertQueryException** crash on `op_type=create` — bulk response uses `create` key, not
39+
`index`; now uses `array_key_first()` with proper 409 status code inference
40+
- **Field mapping resolution**`getFieldsMapping()` now uses `_mapping` API instead of
41+
`_mapping/field/*` (OpenSearch PHP client returns empty for wildcard field queries)
42+
- **`hasColumns()`** — iterates individual field checks instead of comma-separated query (same
43+
OpenSearch PHP client limitation)
44+
- Geo bounding box test (wrong field name + double `.get()` call)
1345

1446
### Changed
1547

1648
- Dropped Laravel 10 support (EOL)
17-
- `pdphilip/elasticsearch` switched from `v5.0.4` (main) to `v0.5.2` (v0-core engine-only build — no ES PHP client bundled)
18-
- `opensearch-project/opensearch-php` constraint relaxed from `2.3.1` to `^2.3`
19-
- Removed `"replace": {"elasticsearch/elasticsearch": "*"}` (no longer needed with v0-core)
20-
- CI matrix updated: PHP 8.3/8.4, Laravel 11/12/13
49+
- PHP minimum bumped from 8.2 to 8.3
50+
- Compat layer refactored: consolidated `Laravel/v11/` and `Laravel/v12/` directories into 4
51+
self-contained traits in `Laravel/Compatibility/` using inline version checks with spread operators
52+
- `newCollection()` override on base Model to prevent L13.3 `HasCollection` abstract class
53+
instantiation
54+
- `opensearch-project/opensearch-php` updated to `^2.6`
55+
- PHPStan baseline regenerated (36 entries, down from 61 — opensearch-php class casing fix)
2156

2257
**Full Changelog**: https://github.com/pdphilip/laravel-opensearch/compare/v3.0.3...v3.1.0
2358

0 commit comments

Comments
 (0)