open-southeners/extended-php
Extended PHP helpers for modern apps: adds convenient functions, utilities, and small enhancements that complement core PHP to reduce boilerplate and speed up everyday development. Lightweight, easy to drop into existing projects.
Arrays\array_to_csv function to convert an array to a CSV string.Arrays\array_csv function to convert a CSV string to an array.Arrays\array_csv_assoc function to convert a CSV string to an associative array.Classes\class_traits function to get traits used in class or object recursively or not.Strings\is_json function now doesn't throw a deprecation notice on PHP 8.3+Strings\get_email_domain and Classes\class_use)open-southeners/laravel-helpers to open-southeners/extended-php as Laravel Helpers are now located as open-southeners/extended-laravel (repository hereOpenSoutheners/LaravelHelpers and replace by OpenSoutheners/ExtendedPhpOpenSoutheners/LaravelHelpers/Models and replace by OpenSoutheners/ExtendedLaravel/Modelsshort_number stops at M (millions) preventing overflow number removalsshort_number to convert big numbers to suffixed strings like (1000 to 1K, 1000000 to 1M)GetsAttributes::getDescription() method (now public), backward compatible changeOpenSoutheners\ExtendedPhp\Utils\parse_http_query handle empty input with empty returnOpenSoutheners\ExtendedPhp\Utils\build_http_query handle empty input with empty returnOpenSoutheners\ExtendedPhp\Utils\parse_http_query with nested modifiers under parameter keys & simple values (strings)OpenSoutheners\ExtendedPhp\Utils\build_http_query with nested modifiers under parameter keys & simple values (strings)OpenSoutheners\ExtendedPhp\Utils\parse_http_query function for HTTP query parameters parse to multidimensional arraysOpenSoutheners\ExtendedPhp\Utils\build_http_query function for HTTP query parameters build from arraysOpenSoutheners\ExtendedPhp\Strings\is_json_structure function that covers what is_json does not, will also check if the json is a structure and not cases like 0, "0", "hello world"... which are valid in is_jsonOpenSoutheners\ExtendedPhp\Strings\is_json fallback to PHP 8.3 json_validate native function with deprecation warningOpenSoutheners\ExtendedPhp\Strings\is_json now accepts any type as input value following PHP's functionsOpenSoutheners\ExtendedPhp\Enums\GetsAttributes trait and OpenSoutheners\ExtendedPhp\Enums\Description attribute so enums cases can be described and used in arrays.class_exists function, using PHP's instead (was an anti-pattern function)OpenSoutheners\ExtendedPhp\Enums instead of OpenSoutheners\ExtendedPhphas_case enum function now throws exception when value is not an enumenum_is_backed, get_enum_class, enum_to_array, enum_valuesModels\instance_from now takes 2 more parameters (with relationships & enforce, which prevents lazyLoading when false)laravel/helpersis_model returns deprecation notice when sending null valueget_email_domain string helper to get the domain part of an email adressinstance_from fail-safecall helpercall and call_static functionsHow can I help you explore Laravel packages today?