c33s/utils
General-purpose PHP utilities for everyday development: helpers for strings, arrays, filesystem, debugging, and common convenience functions. Designed to be lightweight, easy to drop into existing projects, and useful across Laravel and plain PHP apps.
composer require c33s/utils).intl)? Check composer.json for require/suggest blocks.Str::, Arr::) suffice.preg_replace vs. custom regex helpers).Str::, Arr::, or Illuminate\Support\Helpers?composer.json.php artisan commands).null, false, or malformed data).str_replace() → Utils\String::replace()).app(UtilsFacade::class)) to abstract the package, easing future swaps.composer.json to avoid breaking changes:
"require": {
"c33s/utils": "^1.0"
}
composer.json for PHP 8.x support (Laravel 9+ requires PHP 8.0+). If unsupported, use a polyfill or fork.array_map). Test with:
composer require c33s/utils --dev --with-all-dependencies
./vendor/bin/phpunit
open_basedir restrictions on file ops).Utils\File::read() on non-existent files).Utils\Arr::pluck() → Arr::pluck())."scripts": {
"check:utils": "composer show c33s/utils | grep -E 'version|homepage'"
}
git blame on source files).Utils\String::slugify() instead of Str::slug() for custom rules").array_map() instead").Utils\File::batchProcess() with 10K files).xdebug.memory_limit).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Utility introduces silent bugs | Data corruption (e.g., malformed slugs) | Add input validation wrappers. |
| Package abandoned | Unpatched vulnerabilities | Fork and maintain; migrate to alternatives. |
| PHP version incompatibility | Runtime errors | Use polyfills or downgrade PHP. |
| Utility overrides global functions | Breaks Laravel core (e.g., array_map) |
Avoid global function replacements; use |
How can I help you explore Laravel packages today?