---
title: "nette/utils v4.0.0 Breaking Changes on Packagist | Since.dev"
description: "What each nette/utils release removed, renamed or changed: 131 breaking changes in 1 version on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/nette/utils
last_updated: 2026-12-04
---

# nette/utils breaking changes

nette/utils v4.0.0 (February 2, 2023) is its newest release with breaking changes, 131 of them. The first: Removed Nette\\Utils\\Callback::closure. Every breaking API change we have recorded in nette/utils on Packagist: 131 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `v4.1.6`, released October 20, 2026. BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only license. [Source repository](https://github.com/nette/utils)

Packages on Packagist run on PHP. [PHP end of life dates](https://since.dev/calendar/php.md).

## nette/utils v4.0.0 breaking changes

nette/utils v4.0.0, released February 2, 2023: 131 breaking changes.

- **Removed** `Nette\Utils\Callback::closure`  

Use Closure::fromCallable instead. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Callback::invoke`  

Nette\\Utils\\Callback::invoke was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Callback::invokeArgs`  

Nette\\Utils\\Callback::invokeArgs was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Html::$xhtml`  

Nette\\Utils\\Html::$xhtml was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\ObjectMixin`  

Nette\\Utils\\ObjectMixin was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Reflection::getParameterType`  

Reflection::getParameterType() was removed as obsolete; code calling it must be updated to use native reflection type information. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Reflection::getParameterTypes`  

Nette\\Utils\\Reflection::getParameterTypes was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Reflection::getPropertyType`  

Reflection::getPropertyType() was removed as obsolete; code calling it must be updated to use native reflection type information. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Reflection::getPropertyTypes`  

Nette\\Utils\\Reflection::getPropertyTypes was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Reflection::getReturnType`  

Reflection::getReturnType() was removed as obsolete; code calling it must be updated to use native reflection type information. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\Reflection::getReturnTypes`  

Nette\\Utils\\Reflection::getReturnTypes was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Removed** `Nette\Utils\RegexpException::MESSAGES`  

Nette\\Utils\\RegexpException::MESSAGES was removed in nette/utils v4.0.0 [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Iterators\CachingIterator::__set`  

Was public function \_\_set(string $name, $value); now public function \_\_set(string $name, mixed $value): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Iterators\CachingIterator::__unset`  

Was public function \_\_unset(string $name); now public function \_\_unset(string $name): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Iterators\CachingIterator::getNextKey`  

Was public function getNextKey(); now public function getNextKey(): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Iterators\CachingIterator::getNextValue`  

Was public function getNextValue(); now public function getNextValue(): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Iterators\Mapper::current`  

Was public function current(); now public function current(): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Localization\Translator::translate`  

Was function translate($message, ...$parameters): string; now function translate(string|\\Stringable $message, mixed ...$parameters): string|\\Stringable. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\SmartObject::__set`  

Was public function \_\_set(string $name, $value); now public function \_\_set(string $name, mixed $value): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\SmartObject::__unset`  

Was public function \_\_unset(string $name); now public function \_\_unset(string $name): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\StaticClass::__callStatic`  

Was public static function \_\_callStatic(string $name, array $args); now public static function \_\_callStatic(string $name, array $args): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayHash::from`  

Was public static function from(array $array, bool $recursive = true); now public static function from(array $array, bool $recursive = true): static. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayHash::getIterator`  

Was public function getIterator(): \\RecursiveArrayIterator; now public function &getIterator(): \\Iterator. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayList::__set`  

Was public function \_\_set(string $name, $value); now public function \_\_set(string $name, mixed $value): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayList::__unset`  

Was public function \_\_unset(string $name); now public function \_\_unset(string $name): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayList::from`  

Was public static function from(array $array); now public static function from(array $array): static. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayList::getIterator`  

Was public function getIterator(): \\ArrayIterator; now public function &getIterator(): \\Iterator. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayList::offsetGet`  

Was public function offsetGet($index); now public function offsetGet($index): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\ArrayList::prepend`  

Was public function prepend($value): void; now public function prepend(mixed $value): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::__callStatic`  

Was public static function \_\_callStatic(string $name, array $args); now public static function \_\_callStatic(string $name, array $args): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::associate`  

Was public static function associate(array $array, $path); now public static function associate(array $array, $path): array|\\stdClass. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::contains`  

Was public static function contains(array $array, $value): bool; now public static function contains(array $array, mixed $value): bool. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::first`  

Was public static function first(array $array); now public static function first(array $array): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::get`  

Was public static function get(array $array, $key, $default = null); now public static function get(array $array, string|int|array $key, mixed $default = null): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::getKeyOffset`  

Was public static function getKeyOffset(array $array, $key): ?int; now public static function getKeyOffset(array $array, string|int $key): ?int. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::getRef`  

Was public static function &getRef(array &$array, $key); now public static function &getRef(array &$array, string|int|array $key): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::grep`  

Was public static function grep(array $array, #\[Language('RegExp')\] string $pattern, int $flags = 0): array; now public static function grep(array $array, #\[Language('RegExp')\] string $pattern, bool|int $invert = false): array. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::insertAfter`  

Was public static function insertAfter(array &$array, $key, array $inserted): void; now public static function insertAfter(array &$array, string|int|null $key, array $inserted): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::insertBefore`  

Was public static function insertBefore(array &$array, $key, array $inserted): void; now public static function insertBefore(array &$array, string|int|null $key, array $inserted): void. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::isList`  

Was public static function isList($value): bool; now public static function isList(mixed $value): bool. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::last`  

Was public static function last(array $array); now public static function last(array $array): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::normalize`  

Was public static function normalize(array $array, $filling = null): array; now public static function normalize(array $array, mixed $filling = null): array. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::pick`  

Was public static function pick(array &$array, $key, $default = null); now public static function pick(array &$array, string|int $key, mixed $default = null): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::renameKey`  

Was public static function renameKey(array &$array, $oldKey, $newKey): bool; now public static function renameKey(array &$array, string|int $oldKey, string|int $newKey): bool. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::toKey`  

Was public static function toKey($value); now public static function toKey(mixed $value): int|string. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Arrays::toObject`  

Was public static function toObject(iterable $array, $object); now public static function toObject(iterable $array, object $object): object. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Callback::__callStatic`  

Was public static function \_\_callStatic(string $name, array $args); now public static function \_\_callStatic(string $name, array $args): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Callback::check`  

Was public static function check($callable, bool $syntax = false); now public static function check(mixed $callable, bool $syntax = false). [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Callback::invokeSafe`  

Was public static function invokeSafe(string $function, array $args, callable $onError); now public static function invokeSafe(string $function, array $args, callable $onError): mixed. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)
- **Signature changed** `Nette\Utils\Callback::toReflection`  

Was public static function toReflection($callable): \\ReflectionFunctionAbstract; now public static function toReflection($callable): \\ReflectionMethod|\\ReflectionFunction. [packagist.org](https://packagist.org/packages/nette/utils#v4.0.0)

And 81 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
