pascalvgemert/laravel-cloud-search
Laravel Cloud Search integrates cloud-powered full-text search into your Laravel models, providing a Scout-style API for indexing and querying records. Configure your credentials and get fast, scalable search results with minimal setup.
Architecture fit: The package extends Laravel's query/Eloquent layer with typed field handling (FieldTypes constants), expression support, and a new whereLiteral escape hatch. That places it in the data-access layer of the stack — high leverage, high blast radius. It is a convenience/abstraction layer, not infrastructure, so it should be adopted where it removes hand-rolled raw SQL, not as a mandated standard.
Integration feasibility: Low-to-moderate effort. There is no prior assessment and no repository metadata in the evidence base, so the evaluation rests entirely on the 0.4.0 changelog. The release is additive on its face: Laravel 8 support, one new method, one bug fix, constants, docs, and housekeeping. No removals, no renames, no deprecation notices are declared. A single-service pilot should be achievable inside one sprint, gated on verifying the expression bug fix against existing queries.
Technical risk:
whereLiteral is a raw-SQL surface. If it does not enforce parameter binding, it creates an injection path that code review will not reliably catch. This is the single largest risk in the release and must be validated before adoption.expression. Bug fixes in query construction change generated SQL. Queries that "worked" against the buggy output may now return different result sets — a correctness risk that surfaces as data discrepancies, not exceptions.Key questions:
whereLiteral bind parameters, or does it interpolate values into the SQL string? What does the README instruct?expression bug, and which query shapes change output?FieldTypes constants a rename of existing string literals, or a parallel API? Will the strings be deprecated?Stack fit: Appropriate for Laravel 7/8 services with non-trivial query composition — dynamic filtering, reporting endpoints, admin search — where teams currently hand-write DB::raw fragments. Poor fit for services already standardized on a mature query-filter package; adopting both creates two competing abstractions over the same layer.
Migration path: Adopt greenfield-first. Do not retrofit existing raw-SQL call sites in the same change as the dependency addition. Sequence: (1) add the dependency pinned to 0.4.0; (2) use FieldTypes constants and whereLiteral in new code only; (3) migrate legacy raw-SQL fragments incrementally, one endpoint at a time, with result-set comparison before and after.
Compatibility: Laravel 8 support is the headline and unblocks L8 upgrades — this package was likely a blocker for teams mid-upgrade. Verify the full matrix explicitly: L8 requires PHP 7.3+, so the package's PHP 7.1 floor only matters for teams staying on older Laravel. Confirmation needed on whether L8 support was added alongside or in place of older versions.
Sequencing:
whereLiteral binding semantics — blocking gate.expression call site; capture current outputs as a baseline.composer.json and require lockfile review on upgrade.Maintenance: Low ongoing cost if adoption stays scoped — the package is a thin layer with no runtime services, migrations, or background processes. The real maintenance burden is upgrade review: at 0.x, every bump deserves a changelog read and a SQL-diff regression run. Budget roughly a half-day per upgrade, more if whereLiteral usage is widespread.
Support: No commercial support; community/single-maintainer only. Internal ownership must be assigned — one team accountable for version pinning and upgrade triage. Document the pinned version and the rationale in the service README so it survives staff turnover. Upstream responsiveness is unknown and should be measured over the next two quarters before deepening reliance.
Scaling: No scaling concerns in the conventional sense — the package shapes queries rather than executing them. Performance is a function of the SQL it generates. The one scaling-adjacent risk: whereLiteral invites unindexed or non-sargable predicates that pass code review because they look declarative. Add query-plan review to the performance checklist for any endpoint using it.
Failure modes:
whereLiteral — highest severity, low detectability. Mitigate with a lint/review rule requiring bound parameters, and a grep-based audit in CI.expression fix — manifests as wrong data, not errors. Mitigate with golden-output regression tests on all expression call sites.DB::raw without a codebase-wide rewrite.Ramp-up: Minimal for anyone fluent in Eloquent — the API surface is a handful of methods. Expect under a day to productivity. The non-obvious training point is discipline around whereLiteral: engineers will treat a method named whereLiteral as "just write SQL here." Pair the rollout with a short internal note showing the bound-parameter pattern and a counter-example.
How can I help you explore Laravel packages today?