Releases: nette/utils
Releases · nette/utils
Released version 3.1.3
- compatible with PHP 8.0
- Arrays::
renameKey()
fixed incorrect replacement for existing new keys #230 - Arrays::
renameKey()
returns true if $oldKey was found - Arrays: added
toKey()
- improved PHP doc
- Reflection: fixed parseUseStatements for PHP 8 #229
- SmartObject: better support for $onEvent with typehint
- Image: added new PHP functions
- Strings: ICONV_IMPL can be quoted
- FileSystem: Added $mode to all exceptions.
- Image: compatibility with PHP 8.0
- Reflection: added PHP 8 type 'static'
- Reflection::
isBuiltinType()
added PHP 8 types mixed & false - Reflection::
getReturnType()
fixed for functions - SmartObject: removed return void
For the details you can have a look at the diff.
Released version 3.1.2
Released version 3.1.1
- Reflection::
getParameterDefaultValue()
supports parent::CONST nette/di#231 - improved phpDoc
- Image: added
typeToExtension()
&typeToMimeType()
- Reflection: ensures that
getType()
returns ReflectionNamedType - Json: missing @throws JsonException (#212)
- Image: added
imagecrop()
workaround because it loses transparency on ubuntu on Github Actions - DateTime::from(null) fixed #211
- Html::
htmlToText()
decodes ' - Strings::toAscii - simplified process when Transliterate is available
For the details you can have a look at the diff.
Released version 3.1.0
- Strings::toAscii transliterates я/ю as ya/yu [Closes #203]
- Helpers: added capture(), falseToNull(), getLastError(), getSuggestion()
- FileSystem: added joinPaths(), normalizePath()
- Strings, Validator: throw exception on invalid regexp patterns / malformed input
- Strings: throw exception on malformed UTF-8 in webalize() and to… (#205)
- Html: added helper htmlToText()
- Html: added fromText() & fromHtml(), toText() & toHtml()
- Image: added support for BMP
Released version 3.0.3
Released version 2.5.4
- supports PHP 7.4
- throwing exceptions from
__toString()
is allowed since PHP 7.4 - LegacyObject: removed deprecation warning for extension methods
- added PhpStorm metadata for autocompletion
For the details you can have a look at the diff.
Released version 3.0.2
- Image: fixed lost of alpha after
imagecrop()
#202 - Validators: accepts URL "https://example.com/?query" #190
- composer: added suggestion for tokenizer #187
- Json: added ESCAPE_UNICODE
- throwing exceptions from
__toString()
is allowed since PHP 7.4 - tested against PHP 7.4
- regexp: \z replaced with D modifier
- FileSystem: copy: Add binary safe parameter
- Strings: Optimalize
strlen()
for better performance. (#193)
For the details you can have a look at the diff.
Released version 3.0.1
- Reflection::
getUseStatements()
throw exceptions on anonymous class - Reflection: added 'null' to builtin types (in fact it is reserved type since PHP 7.0)
- added Reflection::
getPropertyType()
(for PHP 7.4) - Validators: better exception message
- Validators: added 'file', 'directory', 'class', 'interface' & mixed
- Validators: added support for
?nullable
types - Validators: grouped & sorted $validators
- Validators: catches TypeError for incompatible types
- Validator:: accepts the plus character as a valid option in numeric strings (#184)
- added Arrays::
toObject()
- Image: fixed empty
error_get_last()
#183
For the details you can have a look at the diff.
Released version 3.0.0 🎉
- requires PHP 7.1
- uses declare(strict_types=1)
- uses PHP 7.1 scalar and return type hints
- Object, ObjectMixin: silently marked as deprecated
- added PhpStorm metadata for autocompletion
Changes
- Strings::before(), after(), indexOf() and pos() return NULL instead of FALSE if the needle was not found
- Arrays::searchKey() returns NULL instead of FALSE when item is not found
- Image::save() and send() throws ImageException on failure (BC break)
- Validators::assertField: first argument has type hint array
- Callback::toReflection() removed support for Nette\Reflection
- some classes & members marked as final
- ITranslator: allow multiple parameters for translated messages (#178)
- deprecated ObjectMixin::getSuggestion()
- MemberAccessException extends from Error (BC break)
- removed StaticClassException, StaticClass throws Error
- Image::save() $file cannot be null, added output()
- DateTime: removed setTimestamp() and getTimestamp(), big int are supported in x64 PHP versions
- Strings::findPrefix accepts only string[] (BC break)
- Removed Nette\Object & ObjectMixin (BC break)
- Callback::invoke() and invokeArgs() are deprecated in favor of native invocation
- Callback: deprecated closure()
- Validators::everyIs: first argument has typehint iterable (BC break)
- Strings::normalize() a compare() dependency on Normalizer is optional
- Strings::normalize() a compare() normalize strings into UTF-8 NFC (#150)
- Filesystem::write() accept NULL in $mode parameter (#139)
Released version 2.5.3
- Callback: removes HTML from error message nette/mail#54
- test: fixed compatiblity with PHP 7.3
- Callback: fixed bug in is_callable($object, true) #176
- Reflection:
token_get_all()
uses flag TOKEN_PARSE - FileSystem: better error messages
For the details you can have a look at the diff.