Skip to content

Releases: nette/utils

Released version 3.1.2

27 May 10:03
@dg dg
Compare
Choose a tag to compare
  • Image: better processing and checking dimensions in strings #217
  • added Reflection::getMethodDeclaringMethod()
  • Strings: throws exception when iconv is missing #215
  • Strings::toAscii() removes non-ascii characters when iconv is not supported #216

For the details you can have a look at the diff.

Released version 3.1.1

09 Feb 14:14
@dg dg
Compare
Choose a tag to compare
  • 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

03 Jan 18:39
@dg dg
Compare
Choose a tag to compare
  • 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

27 Dec 03:43
@dg dg
Compare
Choose a tag to compare
  • Strings: Fix boolean return of Normalizer. (#210)
  • Html: added @​property & @​method
  • phpStan fixes
  • Image: muted warnings
  • Image: added new PHP 7.2 functions

For the details you can have a look at the diff.

Released version 2.5.4

19 Nov 14:39
@dg dg
Compare
Choose a tag to compare
  • 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

21 Oct 20:43
@dg dg
Compare
Choose a tag to compare
  • 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

26 Mar 15:13
@dg dg
Compare
Choose a tag to compare
  • 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 🎉

20 Feb 06:34
@dg dg
Compare
Choose a tag to compare
  • 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

18 Sep 10:25
@dg dg
Compare
Choose a tag to compare
  • 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.

Released version 2.4.10

18 Sep 10:12
@dg dg
Compare
Choose a tag to compare

This release marks the end of life of the nette/utils 2.4 series

  • 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
  • SmartObject: better error message

For the details you can have a look at the diff.