v3.1.0
Future-proofing note: After GitHub incorrectly shadow-banned my account (since reinstated with no
explanation beyond "it shouldn't happen again"), all packages are now mirrored to GitLab. GitHub
remains the home for issues, PRs, and community collaboration, but Packagist downloads exclusively
from GitLab to ensure uninterrupted access to releases regardless of GitHub's actions.
This release is compatible with Laravel 11, 12 & 13
Added
- Laravel 13 support (including 13.3
HasCollectioncompatibility) - Query String Queries —
searchQueryString(),orSearchQueryString(),searchNotQueryString(),
orSearchNotQueryString()with fullQueryStringOptionssupport -
Docs - Track Total Hits —
withTrackTotalHits(bool|int|null)to override the default 10k hit count cap - Docs
- Create or Fail —
createOrFail()throwsBulkInsertQueryException(409) on duplicate IDs
instead of upserting - Docs - Set Refresh Flag —
withRefresh(true|false|'wait_for')to control index refresh behavior on
writes - Docs - Create Only —
createOnly()andwithOpType('create')for dedupe insert semantics with
per-document_op_typesupport - Time-Ordered IDs —
GeneratesTimeOrderedIdstrait for sortable, chronologically-ordered
20-character IDs - Docs QueryStringOptionsandSimpleQueryStringOptionsclasses- Composer test scripts:
composer test:l11,composer test:l12,composer test:l13,composer test:all
Fixed
- QueryException crash on
Undefined array key "error"when OpenSearch returns responses without
the expectederror.typestructure - BulkInsertQueryException crash on
op_type=create— bulk response usescreatekey, not
index; now usesarray_key_first()with proper 409 status code inference - Field mapping resolution —
getFieldsMapping()now uses_mappingAPI instead of
_mapping/field/*(OpenSearch PHP client returns empty for wildcard field queries) hasColumns()— iterates individual field checks instead of comma-separated query (same
OpenSearch PHP client limitation)- Geo bounding box test (wrong field name + double
.get()call)
Changed
- Dropped Laravel 10 support (EOL)
- PHP minimum bumped from 8.2 to 8.3
- Compat layer refactored: consolidated
Laravel/v11/andLaravel/v12/directories into 4
self-contained traits inLaravel/Compatibility/using inline version checks with spread operators newCollection()override on base Model to prevent L13.3HasCollectionabstract class
instantiationopensearch-project/opensearch-phpupdated to^2.6- PHPStan baseline regenerated (36 entries, down from 61 — opensearch-php class casing fix)
Full Changelog: v3.0.3...v3.1.0