Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Elasticsearch Laravel Package

mailerlite/laravel-elasticsearch

A Laravel wrapper for Elasticsearch that makes indexing and searching Eloquent models simple, with a fluent query builder, customizable index mapping, and support for multiple Elasticsearch connections.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. mailerlite/laravel-elasticsearch is a thin Laravel integration layer over the official elasticsearch/elasticsearch PHP client — a service provider, facade, config file, and (in this package's case) an Eloquent-style model/query-builder abstraction. Release 12.0.0's only functional change is "Support elasticsearch 8" (#173). That is architecturally small but operationally large: it moves the package's major version in lockstep with the upstream Elasticsearch major, which is the package's established convention (11.x ↔ ES7, 12.x ↔ ES8).

Integration feasibility. Feasible for any team already on an ES 8.x cluster. Teams on ES 7.x clusters should not take this upgrade — they should pin to 11.3.0 and treat 12.x as unavailable. The remaining release content (Renovate configuration #160, dependency pinning #171, actions/checkout v7 #175, actions/cache v5 #174) is CI-only and carries zero runtime impact.

Technical risk. Moderate-to-high, concentrated in three places:

  1. Silent scope of the major bump. The changelog does not state whether ES 7 support was dropped or retained alongside ES 8. A 12.0.0 semver bump implies a break, but the release notes never say so — and there is no migration guide. Treat any assumption here as unverified.
  2. ES 8 behavioral defaults. ES 8 enables TLS and authentication by default, removes mapping types from index APIs, and tightens several endpoint behaviors. Code that worked against an unsecured local ES 7 will fail at connection or index-creation time, often with errors that surface far from the config change that caused them.
  3. Client version coupling. The package inherits the constraints of elasticsearch/elasticsearch 8.x, whose patch line has its own PHP version floor and its own behavioral changes. This is a transitive upgrade the changelog does not describe.

Key questions for the maintainer (or to answer via a spike):

  • Does 12.0.0 support ES 7 and ES 8 simultaneously, or is ES 7 now unsupported?
  • What is the full compatibility matrix — ES version × PHP version × Laravel version?
  • Does the package's public API (facade methods, model traits, query builder) change, or is the break confined to the underlying client and config?
  • Was the ES 8 path tested against a real ES 8 cluster in CI, or only against a mocked client? Is there an ES 7 shim or compatibility-mode test?
  • Any deprecations introduced ahead of a future 13.x?

Integration Approach

Stack fit. Compatible with a standard Laravel application — no unusual runtime dependencies, no queue or cache coupling, and Elasticsearch remains an optional sidecar service. The upgrade does not force changes to application architecture, only to how the index is reached and how documents are shaped.

Migration path. Two independent upgrades must be sequenced, not combined:

  1. Elasticsearch cluster 7.x → 8.x (infrastructure work, owned by platform/SRE). This is the long pole and should start first.
  2. Package 11.3.0 → 12.0.0 (application work). Only after the cluster is on 8.x.

For teams that cannot move the cluster soon, the correct decision is to stay on 11.3.0 and record 12.x as deliberately deferred. Do not attempt to run package 12.x against an ES 7 cluster in the hope that it works.

Compatibility. Verify the Laravel major version supported by 12.0.0 before scheduling — a Laravel upgrade may need to be bundled. Also re-check any direct dependency on elasticsearch/elasticsearch in composer.json; if the application declares it explicitly, the constraint must be widened to 8.x or the package install will conflict.

Sequencing recommendation:

  1. Inventory every index, mapping, and query the application issues; flag anything using mapping types or type-qualified URLs.
  2. Stand up an ES 8 staging cluster with security enabled (TLS + credentials), i.e. representative of production, not a bare local node.
  3. Spike package 12.0.0 in a branch against that cluster; capture a diff of any query or mapping failures.
  4. Update config (hosts, auth, CA bundle) in staging; run the full search/index test suite.
  5. Roll production in a low-traffic window with a documented rollback to 11.3.0 plus the ES 7 cluster snapshot.

Operational Impact

Maintenance. The introduction of Renovate (#160) and dependency pinning (#171) is a genuine positive: automated dependency PRs reduce the risk of this package drifting silently out of date, which is the usual failure mode for thin integration layers. It also means a steady trickle of dependency PRs to review rather than long quiet periods punctuated by large jumps.

Support. The ES 8 work is attributed to a single contributor (@shuvroroy). The project is maintainer-light, and the release notes contain no migration guide — expect to derive upgrade guidance yourself rather than find it documented. Budget engineer time for that investigation; it is not free.

Scaling. No scaling-relevant change in this release. ES 8 itself brings improvements (denser vectors, better aggregations, faster indexing) that the application can exploit later, but 12.0.0 only unlocks the client, it does not deliver those gains.

Failure modes to watch:

  • Connection failures from ES 8's default-on TLS/auth — most likely at first deploy, most likely in staging that mirrors production poorly.
  • Index-creation failures from mapping-type removal — surfaces at bootstrap or reindex time, not at request time.
  • Silent partial breakage if the package retained ES 7 code paths; the two branches may behave differently under load.
  • Composer resolution failures if the application pins the ES client independently.
  • No rollback path if the ES cluster is upgraded before the package, or vice versa — the two are order-dependent.

Ramp-up. Low conceptual ramp-up (the API surface is unchanged for most users), moderate operational ramp-up (ES 8 security model and mapping semantics). Estimate one engineer-week for the package upgrade itself plus the cluster migration effort, and assume a half-day of debugging around auth and mappings.

Recommendation. 12.0.0 is a legitimate and necessary release — it keeps the package aligned with a supported Elasticsearch major and demonstrates the project is not abandoned. But it is a coordinated infrastructure-plus-application upgrade, not a dependency bump. Approve it as a scoped migration project gated on the ES 8 cluster move; do not let it into a routine composer update.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource