PackageTrack
Sign in Get early access

nette/utils

🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

v4.1.5 455M downloads/mo #85 most downloaded on composer nette/utils

What this package is like to depend on

Last release 1 months ago

17 Jul 2026

Release timing varies

gaps range from 3 weeks to 8 months

Rarely documented

notes for 9 of 77 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

77 releases · first in 2014

7 releases in the last 12 months

see the full history below

Release timeline

77 releases · May 2014 to Jul 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 77
  1. v4.1.5 17 Jul 2026
    Release notes

    This release adds an immutable date/time class, makes file writes safer, background processes possible, and Finder masks smarter. Plus a couple of bug fixes worth picking up.

    ✨ New Features

    • DateTimeImmutable – a new immutable counterpart to Nette\Utils\DateTime. It extends PHP's \DateTimeImmutable with strict validation (invalid dates and times throw instead of being silently rolled over), convenient factories from() and fromParts(), DST-safe relative modifications, and JSON serialization.
    • FileSystem::writeAtomic() – writes a file atomically via a temporary file and rename, so a concurrent reader never sees it partially written or truncated. Ideal for caches and generated configs.
    • Process::detach() – lets a process keep running in the background after the Process object is destroyed, instead of being killed by the destructor. Output must go to a file or be discarded, since nobody reads the pipes after detaching.
    • Process – on Windows with PHP 8.5, captured output now flows through real pipes instead of temporary files, thanks to the fixed stream_select().
    • Html::fragment() and add() – create a nameless element pre-filled with children, or append children to an existing element. Unlike addHtml(), plain strings are escaped by default and nulls are skipped.
    • Html::text() and Html::html() – new static factories replacing fromText() and fromHtml(), which are now deprecated.
    • Finder – the mask now fully drives recursion: **/foo together with in() searches recursively, and the ** short form expands like in zsh, so test/** means test/**/* and **.c means **/*.c (previously such masks silently degraded to a single *).
    • Finder – a trailing slash in a find() mask matches directories only: find('temp/').
    • Finder::exclude() – now uses the same mask grammar as find(): **.txt works, ./ anchors to the search root, and a trailing /, /* or /** controls whether the directory itself, its contents, or both are excluded.
    • Finder – paths are no longer normalized to forward slashes; they stay in their native form, which also fixes corruption of backslashes in POSIX file names. Note: on Windows, returned paths may now contain backslashes where they used to be unified.

    🐛 Bug Fixes

    • ArrayList::prepend() – no longer misbehaves on an empty list.
    • Validators::isUrl() – now rejects malformed IPv4 addresses with octets above 255, so nonsense like http://999.1.1.1 no longer passes as a valid URL.
    • Strings::compare() – tolerates invalid UTF-8 instead of failing when the Normalizer gives up.
    • Strings::length() – the fallback used when neither mbstring nor iconv is available no longer relies on the deprecated utf8_decode(), so it stays quiet on PHP 8.2+.
    • Finder::exclude()exclude('subdir/') silently excluded nothing due to a greedy regex; the trailing /, /* and /** variants now work as documented.
    Open source →
  2. v4.1.4 11 May 2026
    Release notes
    • Process – a new class for starting and controlling external processes: read their output, feed them input, pipe one process into another, wait for completion, terminate, and check exit codes. Process::runExecutable() passes arguments as an array so there's zero shell involvement and no risk of shell injection, while Process::runCommand() is there when you really do want the shell. Comes with timeouts, incremental output consumption (consumeStdOutput() / consumeStdError()), and works on Windows too.
    • FileSystem::isValidFilename() – quickly check whether a string is a safe, cross-platform filename: it rejects path separators, control and reserved characters, trailing dots or spaces, and Windows device names like CON or LPT1.
    • Image::fromFile() and Image::fromString() now accept an optional $warnings parameter – pass it in and any GD warnings are handed back to you as a string instead of being emitted as a PHP warning, so you can log or display them on your own terms.
    Open source →
  3. v4.1.3 13 Feb 2026
    Release notes

    A maintenance release focused on code quality: stricter types, better PHPDoc annotations, and PHPStan now runs as a mandatory CI check. No breaking changes.

    Open source →
  4. v4.1.1 22 Dec 2025
    Release notes
    • Html::addText() accepts int|null for back compatibility [Closes #332][Closes #333]
    Open source →
  5. v4.1.0 01 Dec 2025
    Release notes
    • requires PHP 8.2
    • DateTime: strict behavior (BC break)
    • Strings::webalize() requires INTL extension
    • StaticClass: is not overriding __callStatic()
    Open source →
  6. v4.0.10 01 Dec 2025
    Release notes
    • added Type::with()
    • added Type::fromValue()
    • added Helpers::splitClassName()
    • added Iterables::repeatable()
    • Finder: is_file() does not work with symlinks under Windows
    Open source →
  7. v4.0.9 31 Oct 2025

    Nothing published for this version

  8. v4.0.8 06 Aug 2025
    Release notes
    • support for PHP 8.5
    • Strings::trim() trims Line Separator and Ideographic Space (#326)
    • DateTime: fixed parsing 'ago' modifier #327
    • DateTime::relativeToSeconds() checks for error
    • optimized global function calls
    Open source →
  9. v4.0.7 03 Jun 2025
    Release notes
    • DateTime: constructor and modify() correctly handle the relative time even if the daylight saving time is changed
    • DateTime: added static method relativeToSeconds() for converting relative time string to seconds
    • DateTime: triggers a warning when time overflow occurs
    Open source →
  10. v4.0.6 30 Mar 2025
    Release notes
    • Image: catches all errors during saving
    • added Helpers::IsWindows
    • added ShouldNotHappenException
    • added FileSystem::resolvePath() #308
    • tests: improved descriptions
    • exception: use natural explanatory style
    Open source →
  11. v4.0.5 07 Aug 2024

    Nothing published for this version

  12. v4.0.4 17 Jan 2024

    Nothing published for this version

  13. v4.0.3 29 Oct 2023

    Nothing published for this version

  14. v4.0.2 19 Sep 2023

    Nothing published for this version

  15. v4.0.1 30 Jul 2023

    Nothing published for this version

  16. v4.0.0 02 Feb 2023

    Nothing published for this version

  17. v3.2.10 30 Jul 2023

    Nothing published for this version

  18. v3.2.9 18 Jan 2023

    Nothing published for this version

  19. v3.2.8 12 Sep 2022

    Nothing published for this version

  20. v3.2.7 24 Jan 2022

    Nothing published for this version

  21. v3.2.6 24 Nov 2021

    Nothing published for this version

  22. v3.2.5 20 Sep 2021

    Nothing published for this version

  23. v3.2.3 16 Aug 2021

    Nothing published for this version

  24. v3.2.2 03 Mar 2021

    Nothing published for this version

  25. v3.2.1 11 Jan 2021

    Nothing published for this version

  26. v3.2.0 25 Nov 2020

    Nothing published for this version

  27. v3.1.6 20 Sep 2021

    Nothing published for this version

  28. v3.1.4 25 Nov 2020

    Nothing published for this version

  29. v3.1.3 07 Aug 2020

    Nothing published for this version

  30. v3.1.2 27 May 2020

    Nothing published for this version

  31. v3.1.1 09 Feb 2020

    Nothing published for this version

  32. v3.1.0 03 Jan 2020

    Nothing published for this version

  33. v3.0.4 05 Nov 2020

    Nothing published for this version

  34. v3.0.3 27 Dec 2019

    Nothing published for this version

  35. v3.0.2 21 Oct 2019

    Nothing published for this version

  36. v3.0.1 22 Mar 2019

    Nothing published for this version

  37. v3.0.0 05 Feb 2019

    Nothing published for this version

  38. v2.5.7 13 Dec 2020

    Nothing published for this version

  39. v2.5.6 26 Nov 2020

    Nothing published for this version

  40. v2.5.5 05 Nov 2020

    Nothing published for this version

  41. v2.5.4 19 Nov 2019

    Nothing published for this version

  42. v2.5.3 18 Sep 2018

    Nothing published for this version

  43. v2.5.2 02 May 2018

    Nothing published for this version

  44. v2.5.1 19 Feb 2018

    Nothing published for this version

  45. v2.5.0 17 Feb 2018

    Nothing published for this version

  46. v2.4.10 18 Sep 2018

    Nothing published for this version

  47. v2.4.9 06 Feb 2018

    Nothing published for this version

  48. v2.4.8 20 Aug 2017

    Nothing published for this version

  49. v2.4.7 11 Jul 2017

    Nothing published for this version

  50. v2.4.6 26 Apr 2017

    Nothing published for this version

  51. v2.4.5 29 Mar 2017

    Nothing published for this version

  52. v2.4.4 16 Jan 2017

    Nothing published for this version

  53. v2.4.3 09 Jan 2017

    Nothing published for this version

  54. v2.4.2 19 Dec 2016

    Nothing published for this version

  55. v2.4.1 28 Sep 2016

    Nothing published for this version

  56. v2.4.0 17 Jun 2016

    Nothing published for this version

  57. v2.3.11 12 Dec 2016

    Nothing published for this version

  58. v2.3.10 17 Jun 2016

    Nothing published for this version

  59. v2.3.9 21 Apr 2016

    Nothing published for this version

  60. v2.3.8 18 Mar 2016

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive