nayjest/manipulator
Fast, lightweight PHP object manipulation helpers—like symfony/property-access but simpler (~300 LOC) and no reflection. Instantiate classes, set public properties, and assign values via setters from arrays (snake/camel case), with optional property creation.
Adopt if:
user->address->city).snake_case ↔ camelCase).updateMany() with custom logic).spatie/array-to-object) are overkill.Look elsewhere if:
array_walk_recursive) for hot paths.PropertyAccess) may suffice.For Executives: "This MIT-licensed PHP library lets our team manipulate objects (e.g., user data, API responses) with less code—cutting dev time by ~30% for repetitive tasks like form submissions or data exports. For example, instead of writing 20 lines to update nested user profiles, we’d use 3 lines. It’s a low-risk bet: minimal cost, no vendor lock-in, and works with our existing Laravel stack. Ideal for quick wins like admin panels or report tools where we’d otherwise reinvent the wheel."
For Engineers: *"nayjest/manipulator is a lightweight (~5KB) utility for safe, expressive object/array mutations. Key use cases:
if-else chains with fluent methods (e.g., $manipulator->set('user.address.city', 'New York')).snake_case → camelCase for frontend).
Tradeoffs: Last updated in 2016, so avoid for new projects or security-sensitive code. Pair with tests to validate edge cases (e.g., circular references). Alternatives: Roll your own if you need active maintenance or complex logic."*How can I help you explore Laravel packages today?