This release is compatible with Laravel 11, 12 & 13, and with OpenSearch 2.x & 3.x
Added
- OpenSearch 3.x support - the full suite now runs green against OpenSearch 2.13, 2.19 and 3.8.
Scrolling was the only thing in the way (see Fixed) cursor()returns aLazyCollection- matching Laravel's ownQuery\Builder::cursor()and
Eloquent\Builder::cursor(), socursor()->chunk(),->map(),->filter()and->remember()
all work instead of fataling withCall to undefined method Generator::chunk(). Thanks to
@BobbyBorisov -
#28- CI now runs both OpenSearch lines (2.19.6 and 3.8.0) across PHP 8.3/8.4 and Laravel 11/12/13
Fixed
- Scrolling on OpenSearch 3.x -
cursor()andchunk()released their scroll context through
the client's deprecated url-path branch, whichrawurlencodes the scroll id. OpenSearch 3.x
rejects the result (Cannot parse scroll id/Illegal base64 character 25) where 2.x tolerated
it. Both paths now drive the scroll directly and keep the id in the request body. It only bit when
the base64 id happened to contain a character needing encoding, so it read as intermittent cursor()crashed on a fresh connection -Processor::getRawResponse()dereferenced a null
raw response (Call to a member function asArray() on null). Only select, insert and aggregate
processing assign one, and a scroll runs none of them, so any cursor that was the first query on
its connection died. Every existing cursor test inserted first, which is why nothing caught it- Scroll contexts are always released - a
finallyblock clears the scroll even when a consumer
abandons the cursor early, which the previous path did not guarantee
Changed
cursor()now returnsLazyCollectioninstead ofGenerator.LazyCollectionis an
IteratorAggregate, not anIterator, so anything type-hintingGeneratororIteratoragainst
the old return value needs updating. Iterating withforeachis unaffected- A cursor is now re-iterable - a second pass opens a fresh scroll rather than throwing
Cannot rewind a generator - Dropped the deprecated
SearchResponseIteratorandSearchHitIteratorhelpers, ahead of their
removal inopensearch-php3.0.0 - CI pins the OpenSearch service image.
:latestsilently became 3.8.0 and turned every job red at
once with no package change - PHPStan baseline down to 24 entries from 28 (the deprecated iterator suppressions are no longer
needed)
Laravel 11 notice: Laravel 11 is past its security window, and three advisories now cover the
entire 11.x branch with no 11.x release that clears them (the fixes only ever landed on 12.x and
13.x). Composer 2.9 and up block advisory-affected versions while resolving, so on Laravel 11
composer requireandcomposer updatewill refuse to install anything, this package included.
composer installfrom an existing lock file is unaffected, so deployments keep working.This package still supports and tests Laravel 11, and will keep doing so. If you need to install
or update on it,composer config policy.advisories.block falselifts the block. The real fix is
moving to Laravel 12 or 13.
New Contributors
- @BobbyBorisov made their first contribution in #28
Full Changelog: v3.1.0...v3.2.0