shoyim/latin-to-cyrillic
A Laravel/PHP package for converting Latin text to Cyrillic. It offers simple transliteration helpers for turning Uzbek Latin script into Cyrillic, making it easy to localize names, content, and user input in Laravel applications.
Architecture fit. This is a stateless, pure-PHP string-transliteration library — no persistence, no I/O, no external services. That is the lowest-risk architectural shape a Laravel app can absorb: it can sit behind a single injected service class or facade and be called from form requests, import jobs, model mutators, and search-index builders without touching infrastructure. The open question is packaging: the release notes describe algorithm and test changes but say nothing about a Laravel service provider, config publishing, or container bindings. If it remains framework-agnostic, integration is a one-line composer require plus a thin wrapper we own; if a provider exists, we should confirm it does not auto-register global helpers that collide with ours.
Integration feasibility. Straightforward. The PHP >=7.0 floor is permissive enough to install on any current Laravel release (Laravel 10/11's own PHP 8.1+ floor is the binding constraint, not this package). The public surface appears small: the existing conversion entry points plus the new fromNewLatin(). A developer can wire it up in under a day. What is not feasible in a day is validating that the changed mappings are correct for our corpus — see risk below.
Technical risk. Three items dominate:
Unicode apostrophe handling is a specific hazard: ʻ (U+02BB), ' (U+2018/2019), and ASCII ' are visually similar and commonly mixed in real data. The notes say apostrophe errors were fixed but do not state which codepoints are normalized.
Key questions.
fromNewLatin() paired with a toNewLatin()/old-Latin path, or is old→new conversion implicit in the existing methods?Stack fit. Composer-installable and framework-agnostic in practice; usable from Laravel 5.x through 11.x given the PHP floor. Natural call sites are request normalization, bulk content migration, search analyzers, PDF/report rendering, and any place we currently hand-roll Uzbek transliteration. No queue, no DB migration, no service mesh impact.
Migration path.
v1.3.0 on a branch; do not float the constraint during evaluation.Compatibility. Treat 1.3.0 as a breaking change for our purposes. Downstream surfaces needing recompute or deliberate freezing: database columns holding transliterated text, search indexes and analyzers, cached rendered fragments, exported files, and — most dangerous — URL slugs and unique keys. Sh → Ş will change slugs, which can break inbound links and produce uniqueness collisions. Plan a redirect map and a collision check before backfill.
Sequencing. Package upgrade → golden-corpus diff and sign-off → flag/adapter in place → backfill + reindex + slug redirects → cutover → retain legacy path for historical records with documented mapping. Do not collapse the diff step; it is the only cheap opportunity to catch a mapping error before it is written to production data.
Maintenance. Code churn is low, but regulatory churn is not. The alphabet is now law-driven, so budget for follow-up releases as the regulator clarifies edge cases, and confirm the upstream maintainer is responsive now that CI exists. Pin the version and review each release's mapping table rather than its semver number.
Support. The failure mode here is silent incorrect text — no exception, no 500, just the wrong letter. That shifts support burden from infrastructure to correctness: we need sampled output monitoring, a diff alert on reindex, and a domain reviewer. First-line support will not catch a bad Ğ; only a validation harness or a native speaker will.
Scaling. Effectively free. Pure CPU string operations at microsecond cost, horizontally trivial, no shared state. The only real scaling concern is bulk backfill — chunk imports and avoid per-row service resolution inside tight loops.
Failure modes.
Sh→Ş and Ch→Ç.>=7.0 floor means old runtimes are supported — they are EOL and untested; run production on a supported PHP.Ramp-up. Hours for a PHP developer to integrate and call the API; two to three days for the team to build corpus-based confidence, reindex, and fix slugs; plus a language/legal reviewer to sign off the mapping table. The engineering cost is small — the correctness and content-migration cost is where the estimate actually lives.
How can I help you explore Laravel packages today?