All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Deprecation notices with PHP 8.4 around nullable parameters
- Name of the package from
open-southeners/laravel-helpers
toopen-southeners/extended-php
as Laravel Helpers are now located asopen-southeners/extended-laravel
(repository here - As package name changed we reflected the change to all namespaces, search
OpenSoutheners/LaravelHelpers
and replace byOpenSoutheners/ExtendedPhp
- All functions from models (moved to the extended-laravel package so replace this one with the Laravel one). To get this right you should search
OpenSoutheners/LaravelHelpers/Models
and replace byOpenSoutheners/ExtendedLaravel/Models
- Function
short_number
stops at M (millions) preventing overflow number removals
- Function
short_number
to convert big numbers to suffixed strings like (1000
to1K
,1000000
to1M
)
- Reusable
GetsAttributes::getDescription()
method (now public), backward compatible change
OpenSoutheners\ExtendedPhp\Utils\parse_http_query
handle empty input with empty returnOpenSoutheners\ExtendedPhp\Utils\build_http_query
handle empty input with empty return
OpenSoutheners\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 arrays
OpenSoutheners\ExtendedPhp\Strings\is_json_structure
function that covers whatis_json
does not, will also check if the json is a structure and not cases like0
,"0"
,"hello world"
... which are valid inis_json
OpenSoutheners\ExtendedPhp\Strings\is_json
fallback to PHP 8.3json_validate
native function with deprecation warning
OpenSoutheners\ExtendedPhp\Strings\is_json
now accepts any type as input value following PHP's functions
OpenSoutheners\ExtendedPhp\Enums\GetsAttributes
trait andOpenSoutheners\ExtendedPhp\Enums\Description
attribute so enums cases can be described and used in arrays.
- PHPUnit 10 support
- Tests for Laravel 10
- Types to native PHP (when possible)
- PHP 8.2 support
class_exists
function, using PHP's instead (was an anti-pattern function)
- Enum functions now are namespaced as
OpenSoutheners\ExtendedPhp\Enums
instead ofOpenSoutheners\ExtendedPhp
has_case
enum function now throws exception when value is not an enum
- Enum functions:
enum_is_backed
,get_enum_class
,enum_to_array
,enum_values
Models\instance_from
now takes 2 more parameters (with relationships & enforce, which prevents lazyLoading when false)
- Missing autoload-dev, tests were autoloaded with the released version (ouch!)
- Drop support for PHP 7.4
- Unused dependency
laravel/helpers
is_model
returns deprecation notice when sendingnull
value
get_email_domain
string helper to get the domain part of an email adress
- Make
instance_from
fail-safe
- Way to nest methods in
call
helper
- Minor fixes to model and class functions
call
andcall_static
functions
- Simplify tests and functions improving coverage
- Move the repository to a new organization
- Initial release!