kaveraa/unaccent-search
Unaccent Search brings accent-insensitive search to Laravel and PHP. It normalizes diacritics so queries like "cafe" match "café", with simple helpers and query scopes that make multilingual, user-friendly search easy to add to any Eloquent model.
What this package is: kaveraa/unaccent-search is a small Laravel package that adds accent-insensitive ("unaccent") matching to search queries — i.e. ecole matches École. It is a utility library, not a platform component: no daemon, no queue worker, no external service.
Architecture fit: Good fit for a conventional Laravel app. It slots into the Eloquent/query-builder layer, so it composes with existing repositories and scopes rather than forcing a search-service rewrite. It is not a replacement for Scout/Meilisearch/Elasticsearch — it solves the single problem of diacritic folding in SQL-backed search. Treat it as a tactical improvement to LIKE-based search, not as a search architecture decision.
Integration feasibility: Low. Composer install, package auto-discovery, optionally publish config. A single engineer can evaluate and wire it into one endpoint inside a sprint.
Technical risk: Low-to-moderate, concentrated in two areas rather than in the code itself:
unaccent(col), LOWER(...)) makes ordinary B-tree indexes unusable and silently converts indexed lookups into sequential scans. This does not show up in dev with 500 rows; it shows up in production with 5M.Assessment of v2.0.4 specifically: No code change. The release contains only a README banner URL fix (pinned to a commit rather than main), a reflow of code comments into plain English, and CI expansion to PHP 8.5 / PHPUnit 13 on the dev side. From a risk standpoint this is a zero-impact release — no API changes, no behaviour changes, no deprecations, no migration. Its informational value is as a maintenance signal: the project is actively tended and is tracking the PHP release train ahead of the curve. The bilingual FR/EN release notes and the comment-rewrite-to-English suggest a francophone maintainer deliberately broadening the contributor base — mildly positive for long-term sustainability.
Key questions to put to the maintainer / spike:
unaccent extension; MySQL relies on collation (utf8mb4_unicode_ci already folds accents in comparisons) and this package may be redundant or may conflict there.Stack fit: Standard Composer package for Laravel with service-provider auto-discovery. No PHP extensions required beyond what the app already has, unless it delegates to a database-side unaccent function — confirm in the spike. Works alongside existing code; does not require adopting a particular search abstraction.
Migration path: Deliberately non-invasive.
composer require kaveraa/unaccent-search on a branch; publish config if offered.There is no schema migration introduced by the package itself, but see the caveat below: the performance workaround likely does require a schema change, and that change should be planned as part of the rollout rather than discovered after.
Compatibility: v2.0.4 is a drop-in from v2.0.3 — identical code. If we are already pinned to a 2.x line, adopting this patch is free; there is no reason to rush it and no reason to avoid it.
Sequencing (suggested):
When not to integrate: if the target database is MySQL with a *_ci_unicode collation and search is already LIKE-based, the collation may already be doing this work and the package adds a dependency for no behavioural gain. Establish this before spending engineering time.
Maintenance burden: Very low. No runtime infrastructure, no background jobs, no storage. Upgrades are Composer bumps. The package's own maintenance posture is healthy — v2.0.4 demonstrates CI currency (PHP 8.5, PHPUnit 13) even when no code changed, which is the behaviour you want from a small dependency.
Support model: Community-maintained by a single author. There is no vendor SLA and no commercial support tier. Our mitigation is procedural, not contractual: version pinning, a regression test suite that encodes the behaviour we depend on, and an explicit acceptance that forking is the fallback. Given the small code surface, a fork is a day of work, not a project.
Scaling characteristics: This is where operational attention belongs. Accent folding is a correctness feature with a performance cost:
Failure modes to plan for:
unaccent function is expected and absent (common on managed PostgreSQL where CREATE EXTENSION is restricted), behaviour may degrade or error. Verify on a staging instance that mirrors production's managed-DB permissions, not on local Docker.Ramp-up: A mid-level Laravel developer reaches productive use in a few hours; the package is small and the README (now with a stable banner, and with comments rewritten in plain English) is the primary reference. The non-obvious skills are on the database side — query plans and index strategy — so assign the spike to someone comfortable reading EXPLAIN output, or pair with a DBA. No training programme, no certification, no architectural review board required.
TPM recommendation: Adopt on a pilot basis. v2.0.4 itself requires no decision — it is documentation and CI only, with no code change and no compatibility risk. The decision that matters is the integration decision, and that should be gated on the spike answering the database-engine and indexing questions above.
How can I help you explore Laravel packages today?