- How do I install jokubasr/lithuanian-names-declension in a Laravel app?
- Do not expect a normal composer require to work: this is a Symfony2 bundle whose composer.json will likely constrain symfony/* to the 2.x line and conflict with the Symfony components Laravel already ships. The practical route is to clone the repository, extract the underlying declension service class, and vendor that code into your application. Then bind it into Laravel's container behind your own interface. Skip the bundle's DI extension and compiler pass entirely.
- Is this package compatible with Laravel 10 or Laravel 11?
- There is no official Laravel support: the package ships no service provider, facade, or config file, because it was written as a Symfony2 bundle. It can only be used in Laravel if the core declension algorithm is framework-agnostic and runs cleanly on your target PHP version. Treat Laravel compatibility as something you build yourself through an adapter, not something the package provides.
- Does the declension logic depend on Symfony components?
- That is the key question to answer in a spike, and the repository structure does not settle it: it contains a Bundle class, a DI extension, and a service definition, which suggests the algorithm is wrapped rather than coupled. Inspect the actual service class for Symfony imports, container awareness, or interface implementations before committing. If the class is plain PHP string manipulation, it can be lifted cleanly; if not, extraction becomes a rewrite.
- Which Lithuanian grammatical cases does the package handle?
- It declines personal names across the seven Lithuanian cases: nominative, genitive, dative, accusative, instrumental, locative, and vocative. It accounts for masculine and feminine name forms and includes some rules for foreign-origin names. Edge cases such as hyphenated surnames, single-syllable names, and unisex names are not documented as tested, so validate them yourself.
- What PHP version does it support, and will it run on PHP 8.2 or 8.3?
- The package was last released in 2015, so its composer.json almost certainly declares a PHP 5.x-era minimum rather than a modern range. A minimum-version-only constraint means composer install can succeed while the code fails at runtime on PHP 8.x. Watch for removed functions, dynamic property deprecations, curly-brace string offsets, and untyped signatures against modern interfaces. Run the extracted class under E_ALL on your target runtime before adopting it.
- Are there tests covering foreign surnames, hyphenated names, or Lithuanian diacritics?
- There is no evidence of a meaningful test suite: the project has three stars, zero dependents, and a single author, and its last release was in 2015. UTF-8 handling of Lithuanian diacritics such as ą, č, ę, ė, į, š, ų, ū, and ž through mbstring needs explicit verification. Plan to build a golden corpus and have a Lithuanian-speaking reviewer validate the output.
- Can I use it to generate Lithuanian invoice fields or email salutations?
- That is exactly the use case it targets: personalized greetings, contract party fields, CRM records, and notification templates in an lt-LT locale. The risk is correctness rather than security, since the code is pure string manipulation with no I/O or network access. A wrong case ending on a customer's name is a visible, credibility-damaging defect, so gate production use behind a golden-corpus test.
- Is the package maintained, and who fixes bugs?
- The last release was 2015-10-05, roughly a decade ago, with a single author and no dependents. There is no upstream to patch a defect, so you become the maintainer the moment you adopt it. Fork or vendor the code, pin it internally, and budget time for your own fixes.
- Are there maintained alternatives for Lithuanian name declension?
- None were identified in the technical evaluation, so survey the space yourself before committing. Options include an in-house rules table, a licensed linguistic dataset, or a paid linguistic API. Wrapping the extracted algorithm behind your own interface keeps any of those replacements cheap.
- How should I wire the extracted declension class into Laravel's service container?
- Define a NameDecliner interface in your domain layer, then write one implementation that delegates to the extracted algorithm. Register it as a singleton in a service provider so the third-party code stays at arm's length. This adapter shape makes the dependency swappable if you later replace it with an in-house rules table or a linguistic API.