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

Php Utils Laravel Package

keboola/php-utils

A collection of small PHP utility helpers from Keboola covering common tasks such as string and array manipulation, environment detection, and JSON handling. Lightweight helpers for everyday PHP projects.

View on GitHub
Deep Wiki
Context7

Misc utility functions

Frequently asked questions about Php Utils
What is keboola/php-utils used for?
keboola/php-utils is a small collection of reusable PHP helpers for everyday tasks such as array and string manipulation, JSON encoding and decoding, environment and configuration detection, and input validation or normalization. It is framework-agnostic and intended to reduce duplicated boilerplate across PHP projects. Laravel teams can use it as a Composer dependency when its helpers fit a specific need.
How do I install keboola/php-utils in a Laravel project?
Install it with Composer using composer require keboola/php-utils. There is no Laravel service provider or facade to register, so you can import the helper classes directly in your application code, jobs, commands, or tests. Check Packagist for the current version and PHP requirement before adding it to composer.json.
Is keboola/php-utils compatible with Laravel 10 and Laravel 11?
There is no Laravel-specific version of this package; compatibility depends on its PHP requirement matching the PHP version used by your Laravel release. Check the Composer constraints on Packagist, then install it on a branch and run your test suite. Because it has no framework bindings, it can generally sit alongside Laravel 10 or 11 when the PHP versions align.
Do I need to register a service provider or alias for keboola/php-utils?
No. keboola/php-utils is a plain PHP utility library, not a Laravel package with auto-discovered providers or facades. You use its classes with normal use statements or static helper calls. That also means there is no config file to publish or Laravel-specific setup step.
Can keboola/php-utils help with JSON encoding and decoding in Laravel?
Yes, it includes JSON utilities intended to provide predictable encoding and decoding behavior. You should still handle invalid input, depth limits, and encoding failures in your application. For standard API responses, Laravel's native JSON response and validation features may be preferable, so use the package helpers where they clearly reduce boilerplate.
Does keboola/php-utils provide environment detection helpers for Laravel apps?
The package includes environment and configuration helpers, but Laravel already provides env(), config(), and the APP_ENV environment setting. Use the package helpers only if they solve a specific problem not covered by Laravel's configuration system. Avoid relying on them for values that should participate in Laravel config caching.
Is keboola/php-utils lightweight and safe for production use?
It is described as dependency-light and focused on small helpers, which keeps its footprint low. Production suitability still depends on reviewing the source, checking release history, and running composer audit with your other dependencies. Pin a known version and cover the helpers you rely on with tests before deploying.
How do I test code that uses keboola/php-utils?
Because the helpers are plain PHP, you can unit test them directly with PHPUnit or Pest without booting the Laravel container. Test the inputs and outputs around each helper you use, especially edge cases for arrays, strings, JSON, and validation. Add integration tests where the helpers affect application behavior such as request normalization or configuration.
What are alternatives to keboola/php-utils in a Laravel application?
Laravel's built-in Str and Arr helpers, data_get, validators, and native PHP functions cover many of the same everyday tasks. For broader utility collections, evaluate other Composer packages or small internal helper classes. Choose based on the exact functions you need, PHP version support, and maintenance activity rather than installing overlapping helper libraries.
How is keboola/php-utils maintained and should I worry about updates?
The provided context does not identify the repository, so check Packagist and the linked source for release frequency, open issues, and supported PHP versions. If the package appears inactive, keep using it only if the helpers are small and well tested, or vendor the needed logic into your own code. Always review changes before upgrading a production dependency.
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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource