Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
String Morpher

String Morpher Laravel Package

ssolweb/string-morpher

ssolweb/string-morpher offers a fluent PHP/Laravel API for morphing strings into common formats like camelCase, snake_case, slug, and studly case, plus custom rules for reusable, consistent string transformations.

View on GitHub
Deep Wiki
Context7

A powerful string manipulation library

Frequently asked questions about String Morpher
How do I install ssolweb/string-morpher in a Laravel application?
Install the package with Composer using composer require ssolweb/string-morpher. In Laravel, check the package README for any service provider, facade, or configuration registration instructions before wiring it into your code. The v1.1.5 release summarized here indicates no service-provider changes, so treat it as an additive upgrade and validate in a branch first.
Which PHP and Laravel versions does ssolweb/string-morpher support?
The provided evaluation does not state specific PHP or Laravel version constraints, so check the package composer.json and README before adopting it. Confirm compatibility against your application's PHP and Laravel constraints, especially if you are on an older framework version. Run the package in a development spike before updating production dependencies.
What string formats can string-morpher convert strings into?
The package provides a fluent PHP and Laravel API for common formats such as camelCase, snake_case, slug, and studly case. It also supports custom rules so teams can build reusable and consistent string transformations. Version 1.1.5 adds slugify, wrap, and unwrap transformers for slug generation and prefix or suffix handling.
How do the new slugify, wrap, and unwrap transformers work in v1.1.5?
Version 1.1.5 introduces slugify for slug-style output, a wrap transformer for adding prefixes or suffixes, and an unwrap transformer for removing prefixes or suffixes. The release summary indicates these are additive features, but exact method signatures should be confirmed in the README or source. Test null values, empty strings, Unicode input, and repeated prefixes or suffixes before relying on them in production.
Is upgrading to ssolweb/string-morpher v1.1.5 a breaking change?
The release is described as additive, with no migrations, service-provider changes, or breaking API changes indicated. However, new features were shipped in a patch release, which can bypass stricter change-management expectations if your team auto-updates patch versions. Pin to a tested version range and review transformer chaining behavior before rollout.
How should I test wrap and unwrap transformations for edge cases?
Add unit tests for null and empty strings, Unicode values, repeated prefixes or suffixes, and transformer ordering. Use representative production data to confirm that wrap and unwrap behave predictably when chained with existing transformations. Treat v1.1.5 as a controlled feature release even though it is versioned as a patch, and add logging around transformation failures.
Can I use ssolweb/string-morpher outside Laravel in plain PHP?
The package is distributed through Composer and described as a PHP and Laravel string manipulation library, so it can fit plain PHP projects as well as Laravel applications. Verify any framework-specific integration details in the README before assuming Laravel-only behavior. Its transformer-style API is most useful where you already normalize strings in request, response, import, or presentation layers.
How do custom transformation rules work in string-morpher?
The package supports custom rules for reusable and consistent string transformations, allowing teams to compose project-specific formatting into existing pipelines. Confirm how custom rules interact with built-in transformers and whether ordering assumptions are shared across your own transformer classes. Add focused tests for custom rules before replacing existing normalization code incrementally.
What are the production risks of auto-updating string-morpher patch versions?
The main risk noted in the evaluation is versioning signal: new features shipped in a patch release can surprise teams that automatically accept patch updates. Behavior around transformer ordering, prefix or suffix matching, slug generation, and null handling should be verified with tests. Use a lockfile update in a branch, review release notes, and avoid broad auto-updates until the maintainers' semantic-versioning approach is accepted by change management.
What alternatives or migration approach should I consider before adopting string-morpher?
Compare it with Laravel's built-in string helpers, native PHP functions, and any existing custom normalization code already in your application. If custom string-normalization code exists, migrate incrementally by integrating one low-risk use case such as slugify or unwrap rather than replacing everything wholesale. Sequence a development spike, add edge-case tests, deploy behind normal CI, and expand usage only after validation.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console