topthink/think-helper
Helper library for ThinkPHP offering everyday utility classes and functions, including array and string manipulation (Arr, Str), a collection-like Set, hashing, time helpers, and base64url encoding. A lightweight dependency that keeps common tasks out of your application code.
topthink/think-helper is a commodity library of array/string/collection helpers (think\helper\Arr, think\helper\Str, think\Collection, think\helper\Set, time helpers). It informs the recurring build-vs-borrow call on "do we maintain our own helpers.php?" — the answer here is usually borrow, but only transitively, because the functions are generic and undifferentiated.topthink/framework, disallow as a direct require in application code unless the team is already committed to ThinkPHP.illuminate/support. It informs the deprecation backlog: every call site using Arr::get, Str::snake, or similar is a candidate for replacement with native or framework-native equivalents during the next upgrade window.Adopt (or rather, tolerate) it when:
helpers.php that a small team would have to test and maintain.Look elsewhere when:
illuminate/support already provides Arr, Str, and Collection with different signatures. Treating it as a drop-in will produce subtle breakage.files; co-loading with Laravel's helpers or PHP 8 natives risks redeclaration conflicts and confusing resolution order. Prefer class-based static helpers or a polyfill (symfony/polyfill-php80).psr/* or framework-native contracts instead.think\helper\* namespaces is a lock-in cost with no corresponding benefit.To executives: This is a small, free, permissively licensed utility library — not a product dependency and not a strategic bet. It carries no roadmap implications and no procurement cost. The only decision on the table is governance: allow it to arrive indirectly through the framework, and decline to make it a first-class dependency of anything we build. Risk is low in isolation; the real risk is namespace and helper-function coupling that makes a future framework migration more expensive than it needs to be.
To engineering: If you're inside ThinkPHP, this is already installed — stop there. Don't composer require it directly; you'll fight version pins for no gain. If you're on Laravel or Symfony, this package adds nothing that illuminate/support or symfony/* doesn't already do better, and its helper signatures differ, so "it looks like Laravel's Arr" is a trap. Flag every call site you touch as a modernization candidate: replace Str::snake() and friends with native PHP 8 string functions or the framework's own helpers as part of normal refactoring, not as a dedicated project. Net engineering position: zero direct requires, zero migration work, no dedicated budget.
How can I help you explore Laravel packages today?