Migrating to Version 4.0
This page is being built incrementally as packages are released.
Minimum required PHP version is 8.0
All name changes mentioned in this document mean that the original name obviously still exists and works, it is just marked as deprecated. You may encounter the IDE visually marking them as deprecated.
Nette\Utils\Reflection class provided methods
getReturnType() for working with the types. These methods were created when PHP didn't have union, intersection
or the newest disjunctive normal form types, which they no longer work with and were replaced by the Type class. As of version 4.0, these methods have been removed.
Nette\Utils\Reflection::getParameterDefaultValue() is deprecated because the native
ReflectionParameter::getDefaultValue() already works correctly.
Nette\Utils\Html::$xhtml variable is removed.
To install Nette Utils 4.0 you need to update RobotLoader to version 4 if you are using it, and remove the
composer remove nette/finder composer require "nette/utils:^4.0" "nette/robot-loader:^4.0"
Finder has moved to the package
nette/utils, see Utils 4.0.
On Linux, it now behaves in case-sensitive mode.
In the previous version, the
filter() methods worked differently when called
in() respectively, and after it. This is no longer the case,
filter() always work the same. The former
filter() called before has
been replaced by the new
The Finder no longer implements the Countable interface.
A string starting with a slash in
Finder::findFiles('/f*') is now considered an absolute path, it should be
replaced with e.g.