epigra/tckimlik
A PHP package for validating and generating Turkish TC Kimlik (national ID) numbers, with Laravel validation rule support and a simple API for checking ID format and checksum, making Turkish identity verification easy to add to forms and applications.
trUpper through Transliterator) is a correctness fix in Turkish case folding, which matters specifically where user-entered names are compared against registry data. It signals the package is actively maintained and handles the Turkish i/İ casing trap that silently breaks naive strtoupper() comparisons — a real source of false mismatches in verification flows.Adopt when:
Look elsewhere or build in-house when:
Watch items before adopting: confirm the maintainer bus factor (v1.2.0 is the first contribution from a new contributor, which is a positive signal but also indicates a very small team), check whether tests cover the new Transliterator path, and verify the Transliterator extension is available in your runtime — it is a PHP intl extension requirement, and a missing intl will surface as a runtime error rather than a validation failure.
To executives: We serve Turkish users and currently accept national ID numbers at face value. This package adds standard validation of the Turkish national ID at the point of capture, plus optional cross-checking of name and date of birth against the official registry. It is a small, free dependency rather than a build project, so it removes a recurring engineering task and reduces fake sign-ups and downstream manual review cost. The latest release tightens name matching for Turkish characters, which reduces false rejections of legitimate users. It is a hygiene control, not a replacement for a licensed identity-verification vendor — if we need document or biometric checks, that remains a separate procurement.
To engineering: Add the package via Composer; the service provider and facade are auto-discovered. Use the provided validation rule on form requests for cheap, synchronous rejection of malformed IDs, and keep registry verification behind a queued job with explicit timeouts, since it is an external call. The v1.2.0 change replaces the hand-rolled uppercasing in trUpper with PHP's Transliterator, which correctly handles Turkish dotted/dotless i — this is the class of bug that causes valid users to fail verification, so treat it as a correctness fix worth taking. No public API changes and no migration work. Two things to confirm in review: that ext-intl is present in our runtime images, and that we have tests asserting the verification path for names containing i, ı, İ, and ş/ğ. Given the project's small contributor base, pin the version and own a fallback plan — worst case we inline the checksum and drop the external call.
How can I help you explore Laravel packages today?