jawira/case-converter
Convert strings between 13 naming conventions with jawira/case-converter: camel, Pascal, snake, Ada, macro, kebab, train, Cobol, title, sentence, dot and more. It auto-detects the input format, offers a factory, and supports i18n.
Architecture fit: Unchanged in substance. Laravel's native Str covers snake, camel, kebab, and studly/Pascal. This package's value remains confined to the niche conventions (Ada, Cobol, Train, Dot, etc.). The release notes now identify the upstream as jawira/case-converter, which confirms it is a framework-agnostic library rather than a Laravel package — no service provider, no facade, no config publishing. Integration is a direct composer require plus static/instance calls. That is architecturally clean but also means zero Laravel-native affordances (no container binding, no Str macro compatibility).
Integration feasibility: Feasible, and the previously unassessable dependency risk is now partially resolved. The package has a public GitHub repository, an active maintainer (@jawira) merging PRs, and a test suite spanning both PHPUnit and Behat — the PHPUnit/Behat bump in this release is direct evidence of maintained tests, which answers a prior open question. The removal of Code Climate is a CI/reporting simplification and carries no runtime consequence.
Technical risk: The material change is the move to PHP 8.2 as the code baseline. This is shipped as a minor version (v3.7.0) rather than a major, which is a semver concern: consumers on PHP 8.0/8.1 who accept the minor bump via a loose constraint may find themselves on an unsupported runtime. Practically this constrains the package to Laravel 11+ (PHP 8.2 baseline), or Laravel 10 only where PHP has been pinned forward. The previously flagged "future release date" anomaly (2025-06-13) is not resolved by these notes, but the presence of a coherent v3.7.0 changelog with a real repo and PR trail makes fabricated-data risk considerably less likely — treat it as a data-quality question on the registry feed, not a package-integrity red flag. Packagist score and star count remain low; community traction is still thin.
Key questions:
composer.json require.php before committing.Stack fit: Still redundant for mainstream casing needs; adopt only if the product genuinely needs the long-tail conventions. The PHP 8.2 requirement now becomes a gating check rather than a footnote — validate it against every environment in the matrix (local, CI, staging, prod) before the first composer require, because a mid-sprint discovery forces either a PHP upgrade or a version pin to v3.6.x.
Migration path:
^3.6 explicitly rather than relying on a loose constraint.CaseConverter wrapper or a Str macro) so the rest of the codebase never calls the vendor API directly.Str calls untouched.Compatibility: The v3.7.0 PHP 8.2 floor is the dominant compatibility fact. It effectively excludes Laravel 9 and below, and Laravel 10 on PHP 8.1. Also verify the constraint is expressed as ^3.7 rather than ^3.0 in our composer.json, otherwise a future minor could move the runtime floor again without warning — that is a realistic failure mode given this release's precedent.
Sequencing: Front-load the PHP-version validation and the adapter creation. Both are cheap early and expensive late. Because the package is framework-agnostic and isolated behind an adapter, the sequence can run in parallel with feature work rather than blocking it — which was not clearly true in the prior assessment, where namespace collision with Str was treated as the primary sequencing risk. That risk is now lower than the runtime-floor risk and should be deprioritized accordingly.
Maintenance: Low surface area — one small, single-maintainer library behind an adapter. The adapter is what protects us: if the package stalls or breaks, swapping implementations is a one-file change. Worth budgeting a small recurring check on releases, specifically watching for further runtime-floor bumps disguised as minors.
Support: Effectively single-maintainer, best-effort, no commercial backing. Acceptable for a utility of this size and blast radius; not acceptable for anything on a critical path without the adapter in place. The now-public repo and dual test framework (PHPUnit + Behat) raise confidence in baseline quality relative to the prior assessment.
Scaling: Conversion is pure string manipulation — CPU-negligible at any realistic volume. No I/O, no state, no external dependency. There is no scaling concern. If conversions ever land in a hot loop over large collections, benchmark against Str once and cache results if needed, but this is unlikely to matter.
Failure modes:
^3.7 pin and CI running the oldest supported PHP.Ramp-up: Near-zero for any PHP developer — the API is self-evident and the documentation was improved in this release (PR #93). The real ramp-up cost is the process conversation: when to use the package versus native Str. Without a written convention, teams will default to Str and the dependency becomes dead weight. Document the decision rule alongside the adapter.
How can I help you explore Laravel packages today?