jbzoo/utils
JBZoo Utils is a practical, framework-agnostic collection of PHP helpers for arrays, strings, files, CSV, XML, JSON, URLs, and more. It provides consistent APIs and reusable, well-tested tools that reduce boilerplate and speed up everyday PHP and Laravel development.
What it is. jbzoo/utils is an unopinionated grab-bag of static helper classes and functions spanning arrays, strings, filesystem paths, CSV/JSON/XML handling, image resizing, HTTP convenience calls, environment/system introspection, and filtering/sanitization. It is a "Swiss army knife" leaf dependency, not a framework component. There is no Laravel service provider, facade, config file, container binding, or auto-discovery — it is consumed entirely through static calls under the JBZoo\Utils\* namespace.
Architecture fit. Low architectural weight, which cuts both ways. It will not shape our architecture, and it will not fight it. It fits cleanly as an internal convenience layer in CLI commands, import/export jobs, admin tooling, and one-off scripts. It does not fit in the domain layer or anywhere we expect to mock collaborators in unit tests: static helpers are effectively unmockable, push code toward procedural style, and make dependency seams invisible during code review. Treat it as a vendor utility belt, not infrastructure.
Integration feasibility. Mechanically trivial: composer require, PSR-4 autoload, no bootstrapping. Because it is framework-agnostic, it will install cleanly on Laravel 10–12 and PHP 8.x. The real friction is conceptual overlap — Illuminate\Support\Str/Arr, Illuminate\Support\Facades\Storage/Http, league/csv, and assorted symfony/* components already cover a large share of its surface. The integration risk is not "will it install" but "will we end up with two idioms for the same job."
Technical risk. Moderate-low, concentrated in three places: (1) helpers that touch the filesystem, HTTP, or images bypass Laravel's Storage/Flysystem, HTTP client, and logging abstractions, creating portability and observability gaps; (2) a wide, uneven API surface where quality varies per helper and behavior is not always documented; (3) a single-maintainer bus factor behind an 812-star project with a modest ecosystem footprint (reflected in the low composite score). MIT licensing and Composer-native distribution keep legal and supply-chain friction near zero.
Key questions for the maintainer / vendor review.
ext-mbstring, ext-json, ext-gd, ext-imagick, or ext-intl — and are those hard or soft requirements?Storage-managed paths, suppress errors with @, use eval/extract, or shell out?Stack fit. PHP 8.x / Laravel 10–12 composes fine because the package has no framework coupling. It is not Laravel-native and should not be presented to the team as such. Position it as a utility vendor library, deliberately scoped, not a first-class citizen of the application architecture.
Do the overlap analysis first. Build a short matrix mapping candidate helpers against Laravel and Symfony equivalents. Default to framework primitives; allowlist only helpers with no reasonable first-party equivalent (e.g., specific CSV dialect sniffing, color conversion, XML/array normalization edge cases). This is the single highest-leverage TPM activity here — without it, adoption sprawls and the dependency becomes load-bearing by accident.
Migration path. Do not rip-and-replace existing code. Introduce the package behind thin internal adapters (App\Support\*) so the dependency stays at the edge of the codebase. If the package is later abandoned or swapped, only the adapters change. Constrain the Composer requirement (^x.y, not *), commit the lockfile, and record the decision in a one-page ADR with the allowlisted helper set.
Compatibility checks. Run composer why-not and platform-requirement checks against our PHP matrix; exercise lowest and highest supported PHP in CI. Verify namespaced functions/classes do not collide with existing code or globals. Expect zero bootstrapping cost (no provider, no publishable config) and zero framework integration (no facades, no testing helpers) — budget accordingly.
Sequencing.
App\Support" via PHPCS or an architecture test.Maintenance. Ongoing cost is low but not zero: someone must own release tracking, security advisories, and PHP deprecation cycles. Composer-native distribution and MIT licensing keep the tax small. The genuine maintenance risk is the single-maintainer bus factor; the adapter boundary and a fork-ready posture are the mitigation, not a hope that the project stays healthy.
Support. Community-only via GitHub issues. No commercial SLA, no vendor escalation path. Acceptable for internal tooling and non-critical utilities; not acceptable for payment, auth, or anything with a customer-facing error budget.
Scaling. The helpers are stateless and cheap. Watch the I/O-bound ones: CSV/XML parsing of large files and image resizing should run in queue workers with explicit memory limits, never inline in a web request. There is no caching layer, so repeated helper calls are repeated work — fine at low volume, worth measuring before it lands in a hot loop.
Failure modes to plan for.
false/null or suppressing warnings, which surfaces as bad data rather than an exception.Storage, breaking S3 disks, backup coverage, and container permission assumptions.Ramp-up. Developer ramp is fast — procedural, self-explanatory names, roughly half a day to first productive use. The ongoing cost is discipline, not learning: a broad API invites inconsistent usage and duplicate idioms. Mitigate with a one-page internal style guide, the approved-helper list in the repo, two or three worked examples, and a code-review checklist item. Budget for that discipline continuously, not just at onboarding.
How can I help you explore Laravel packages today?