icanboogie/inflector
A fast, dependency-free PHP inflector for English words. Pluralize and singularize nouns, and convert between camelCase, snake_case, hyphenated, humanized and title-case forms. Works standalone or with ICanBoogie, with customizable rules and locale support.
blog_posts becomes blog-posts or blogPosts across the product.created_at vs createdAt) are product-facing contracts. This package is a candidate for enforcing those rules consistently rather than relying on ad-hoc regex in controllers.str_replace logic, but it competes with Laravel's built-in Str::plural(), Str::camel(), and Str::slug(), which already cover English. The decision hinges entirely on whether non-English locales are in scope.Consider it when:
Str helpers fall short.Look elsewhere when:
Str::plural(), Str::camel(), Str::headline(), and Str::slug() are already in the framework, are maintained by Laravel, and carry zero added dependency or legal overhead. This is the default answer for most Laravel apps.symfony/translation + intl problem, not an inflector problem. Do not conflate them.NOASSERTION, which means the scanner could not identify it. Legal review is a hard gate before commercial distribution; treat this as unresolved until confirmed.To executives: This is a small, low-cost utility library that removes a recurring source of engineering friction — correctly pluralizing and formatting words across languages. It matters only if we commit to multi-language markets, where it prevents us from hand-building locale rules that are easy to get wrong and expensive to maintain. The ask is modest: one dependency, a short legal check on the license, and a few days of integration and testing. The alternative — writing our own inflection layer — costs more and produces a worse result. If we stay English-only, we should decline and use what Laravel already provides at zero cost.
To engineering: One composer require, wrapped behind a small service provider and facade so it stays swappable. It is standalone and does not drag in a framework. The real work is not integration but characterization testing: pin the transformations we depend on for each locale we ship, so a minor-version bump cannot silently change our URLs or API keys. Budget for that, and keep the wrapper thin enough that swapping to Str or an intl-based approach later is a one-file change.
To legal and security: License is undetected (NOASSERTION) and must be resolved before we ship it in a distributed or commercial artifact. Flag the maintainer concentration as a continuity risk and record a fallback plan.
Recommendation: Adopt conditionally — gated on (1) confirmed multi-language requirements and (2) license clearance. Do not adopt speculatively for an English-only product.
How can I help you explore Laravel packages today?