🛠Lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.
Iterables
Arrays::firstKey()
, lastKey()
Arrays::filter()
Arrays::first()
& last()
: added parameter $elseArrays::first()
& last()
: added parameter $predicate #305Image::getSupportedTypes()
Strings::trim()
trims unicode spaces and ZWSP (#304)Image::rgb()
Image::rectangleWH()
, filledRectangleWH()
, calculateTextBox()
Strings::length()
uses mbstring, iconv and then utf8_decode #299getType()
replaced with isDir()
/ isFile()
some()
, every()
and map()
(#298)Callback::unwrap()
returns correct class name for private methodsgetParameterType()
, getReturnType()
and getPropertyType()
marked as deprecatedImage::isTypeSupported()
collect()
returns listCallback::unwrap()
returns correct class name for private methodsnew methods:
new parameters:
removed
isTypeDeclaration()
, isBuiltinType()
, isClassKeyword()
Types::isSingle()
-> isSimple()
Image::clone()
uses PNG format because GD2 is disabled since libgd 2.3.3extensionToType()
Arrays::isList()
uses array_is_list()
is PHP 8.1Deprecated properties are written as @property-deprecated
, no standard here exists. PhpStorm and static analysis tools do not see them, which is the intention.
Strings::indexOf()
fixed empty $haystack and negative $nth #271Helpers::clamp()
Validators::isPhpIdentifier()
: Value is always string. (#268)Reflection::expandClassName()
recognizes 'parent'Reflection::isClassKeyword()
, Type::isClassKeyword()