levenify/levenify-bundle
Levenify Bundle integrates Levenify's fuzzy string matching into Symfony apps, making it easy to add Levenshtein-based similarity checks, typo-tolerant search, and record deduplication. Configure thresholds and services, then compare strings quickly in PHP.
levenshtein() is sufficient for our data (ASCII, short fields, under 255 chars), fuzzy matching is a config change, not a roadmap line item. If our data is multilingual, accented, or has long free-text fields — or we need a normalized 0–1 score — it becomes real scope.Support\StringSimilarity helper behind an interface. This package is most valuable as a reference implementation and benchmark baseline, not as a dependency.composer require.Consider (as a spike or as source material):
levenshtein() is genuinely insufficient: strings over 255 characters, UTF-8/multibyte input (accents, CJK), a need for a normalized 0–1 score, or non-uniform insert/delete/substitute weights (e.g., transposition should be cheaper than substitution for typing errors).similar_text(), soundex(), metaphone(), Postgres pg_trgm/fuzzystrmatch, or a managed search engine — the package gives you a ready-made reference point.Look elsewhere / do not adopt as a production dependency:
levenshtein() / similar_text() on both accuracy and p95 latency against a labeled pair set from our own corpus. If it doesn't, there is no case.For executives (one paragraph): "Fuzzy matching and duplicate detection are on the roadmap for imports and search. The cheap path is a small internal utility — roughly one to two sprints — not a vendor contract or a search-platform purchase. I evaluated this open-source package as a shortcut: it's MIT-licensed, so we can legally copy the algorithm into our own codebase. I recommend we do not take it as a dependency — it has three GitHub stars, zero downstream users, one maintainer, and targets Symfony 5, which is end-of-life. The risk isn't code quality; it's that nobody is accountable for it. The upside is identical either way: the algorithm is small enough to own, and owning it removes the supply-chain, licensing, and upgrade risk entirely."
For engineering (the ask): Run a bounded spike — two days, no production dependency.
StringSimilarity interface with a native-PHP implementation as the default, so nothing couples to the bundle or its Symfony glue.levenshtein(), similar_text(), this routine, and Postgres pg_trgm — on precision/recall and p95 latency.Framing to use: "This is a $0 dependency decision with measurable upside, gated on evidence." The package earns its place as a benchmark baseline and a source of an algorithm we may legally adopt — not as a line in composer.json.
How can I help you explore Laravel packages today?