|
2 | 2 |
|
3 | 3 | All notable changes to this `laravel-opensearch` package will be documented in this file. |
4 | 4 |
|
| 5 | +## v3.2.0 - 2026-08-19 |
| 6 | + |
| 7 | +This release is compatible with Laravel 11, 12 & 13, and with OpenSearch 2.x & 3.x |
| 8 | + |
| 9 | +### Added |
| 10 | + |
| 11 | +- **OpenSearch 3.x support** - the full suite now runs green against OpenSearch 2.13, 2.19 and 3.8. |
| 12 | + Scrolling was the only thing in the way (see Fixed) |
| 13 | +- **`cursor()` returns a `LazyCollection`** - matching Laravel's own `Query\Builder::cursor()` and |
| 14 | + `Eloquent\Builder::cursor()`, so `cursor()->chunk()`, `->map()`, `->filter()` and `->remember()` |
| 15 | + all work instead of fataling with `Call to undefined method Generator::chunk()`. Thanks to |
| 16 | + [@BobbyBorisov](https://github.com/BobbyBorisov) - |
| 17 | + [#28](https://github.com/pdphilip/laravel-opensearch/pull/28) |
| 18 | +- CI now runs both OpenSearch lines (2.19.6 and 3.8.0) across PHP 8.3/8.4 and Laravel 11/12/13 |
| 19 | + |
| 20 | +### Fixed |
| 21 | + |
| 22 | +- **Scrolling on OpenSearch 3.x** - `cursor()` and `chunk()` released their scroll context through |
| 23 | + the client's deprecated url-path branch, which `rawurlencode`s the scroll id. OpenSearch 3.x |
| 24 | + rejects the result (`Cannot parse scroll id` / `Illegal base64 character 25`) where 2.x tolerated |
| 25 | + it. Both paths now drive the scroll directly and keep the id in the request body. It only bit when |
| 26 | + the base64 id happened to contain a character needing encoding, so it read as intermittent |
| 27 | +- **`cursor()` crashed on a fresh connection** - `Processor::getRawResponse()` dereferenced a null |
| 28 | + raw response (`Call to a member function asArray() on null`). Only select, insert and aggregate |
| 29 | + processing assign one, and a scroll runs none of them, so any cursor that was the first query on |
| 30 | + its connection died. Every existing cursor test inserted first, which is why nothing caught it |
| 31 | +- **Scroll contexts are always released** - a `finally` block clears the scroll even when a consumer |
| 32 | + abandons the cursor early, which the previous path did not guarantee |
| 33 | + |
| 34 | +### Changed |
| 35 | + |
| 36 | +- **`cursor()` now returns `LazyCollection` instead of `Generator`.** `LazyCollection` is an |
| 37 | + `IteratorAggregate`, not an `Iterator`, so anything type-hinting `Generator` or `Iterator` against |
| 38 | + the old return value needs updating. Iterating with `foreach` is unaffected |
| 39 | +- A cursor is now re-iterable - a second pass opens a fresh scroll rather than throwing |
| 40 | + `Cannot rewind a generator` |
| 41 | +- Dropped the deprecated `SearchResponseIterator` and `SearchHitIterator` helpers, ahead of their |
| 42 | + removal in `opensearch-php` 3.0.0 |
| 43 | +- CI pins the OpenSearch service image. `:latest` silently became 3.8.0 and turned every job red at |
| 44 | + once with no package change |
| 45 | +- PHPStan baseline down to 24 entries from 28 (the deprecated iterator suppressions are no longer |
| 46 | + needed) |
| 47 | + |
| 48 | +> **Laravel 11 notice:** Laravel 11 is past its security window, and three advisories now cover the |
| 49 | +> entire 11.x branch with no 11.x release that clears them (the fixes only ever landed on 12.x and |
| 50 | +> 13.x). Composer 2.9 and up block advisory-affected versions while resolving, so on Laravel 11 |
| 51 | +> `composer require` and `composer update` will refuse to install anything, this package included. |
| 52 | +> `composer install` from an existing lock file is unaffected, so deployments keep working. |
| 53 | +> |
| 54 | +> This package still supports and tests Laravel 11, and will keep doing so. If you need to install |
| 55 | +> or update on it, `composer config policy.advisories.block false` lifts the block. The real fix is |
| 56 | +> moving to Laravel 12 or 13. |
| 57 | +
|
| 58 | +**Full Changelog**: https://github.com/pdphilip/laravel-opensearch/compare/v3.1.0...v3.2.0 |
| 59 | + |
5 | 60 | ## v3.1.0 - 2026-04-06 |
6 | 61 |
|
7 | 62 | > **Future-proofing note:** After GitHub incorrectly shadow-banned my account (since reinstated with no |
|
0 commit comments