Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Upgrade | ||
******* | ||
|
||
|
||
Přechod z verze 3.x na 4.0 | ||
========================== | ||
|
||
Minimální požadovaná verze PHP je 8.0. | ||
|
||
Třída `Nette\Utils\Reflection` poskytovala metody pro práci s typy `getParameterType()`, `getPropertyType()` a `getReturnType()`. Metody vznikly v době, kdy PHP nemělo union, intersection nebo nejnovější disjunctive normal form typy, se kterými už nefungují a nahradila je [třída Type |utils:type]. Od verze 4.0 jsou tyto metody odstraněné. | ||
|
||
Metoda `Nette\Utils\Reflection::getParameterDefaultValue()` je deprecated, protože nativní `ReflectionParameter::getDefaultValue()` už funguje správně. | ||
|
||
Zrušená je proměnná `Nette\Utils\Html::$xhtml`. | ||
|
||
|
||
Finder | ||
------ | ||
|
||
Finder se přestěhoval do balíčku `nette/utils`, původní odstraňte: | ||
|
||
```shell | ||
composer remove nette/finder | ||
``` | ||
|
||
Na Linuxu se nově chová v režimu case-sensitive. | ||
|
||
V předchozí verzi platilo, že metody `exclude()` a `filter()` fungovaly jinak, když byly zavolány **před** `from()` resp. `in()` a **po** ní. Tohle už neplatí, `exclude()` a `filter()` fungují vždy stejně. Dřívější `filter()` volaný *až po* nahradila nová metoda `descentFilter()`. | ||
|
||
Finder již neimplementuje rozhraní Countable. | ||
|
||
Řetězec začínající lomítkem ve `Finder::findFiles('/f*')` se nově považuje za absolutní cestu, je potřeba ho nahradit např. za `Finder::findFiles('./f*')`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Upgrading | ||
********* | ||
|
||
|
||
Migrating from 3.x to 4.0 | ||
========================= | ||
|
||
Minimum required PHP version is 8.0. | ||
|
||
The `Nette\Utils\Reflection` class provided methods `getParameterType()`, `getPropertyType()` and `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 |utils:type]. As of version 4.0, these methods have been removed. | ||
|
||
The method `Nette\Utils\Reflection::getParameterDefaultValue()` is deprecated because the native `ReflectionParameter::getDefaultValue()` already works correctly. | ||
|
||
The `Nette\Utils\Html::$xhtml` variable is removed. | ||
|
||
|
||
Finder | ||
------ | ||
|
||
Finder has moved to the `nette/utils` package, remove the original package: | ||
|
||
```shell | ||
composer remove nette/finder | ||
``` | ||
|
||
On Linux, it now behaves in case-sensitive mode. | ||
|
||
In the previous version, the `exclude()` and `filter()` methods worked differently when called **before** `from()` and `in()` respectively, and **after** it. This is no longer the case, `exclude()` and `filter()` always work the same. The former `filter()` called *before* has been replaced by the new `descentFilter()` method. | ||
|
||
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. `Finder::findFiles('./f*')`. |