-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
6 changed files
with
124 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
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,61 @@ | ||
Přechod na verzi 4.0 | ||
******************** | ||
|
||
.[note] | ||
Tato stránka vzniká postupně s tím, jak se uvolňují jednotlivé balíčky. | ||
|
||
Minimální požadovaná verze PHP je 8.0 | ||
|
||
Všechny změny názvů uvedené v tomto dokumentu znamenají, že původní název samozřejmě nadále existuje a funguje, jen je označený jako deprecated. Můžete se setkat s tím, že vám je bude IDE vizuálně označovat jako deprecated. | ||
|
||
/--comment | ||
Verzí Nette 4.0 se rozumí, že máte tyto balíčky nainstalované ve verze 4.0.*. Ostatní balíčky mohou mít vyšší nebo nižší čísla verzí, kompatibilitu hlídá Composer. | ||
|
||
```json | ||
"require": { | ||
"nette/application": "4.0.*", | ||
"nette/bootstrap": "3.2.*", | ||
"nette/caching": "3.2.*", | ||
"nette/database": "4.0.*", | ||
"nette/forms": "4.0.*", | ||
"nette/http": "4.0.*", | ||
"nette/security": "4.0.*", | ||
}, | ||
``` | ||
\-- | ||
|
||
|
||
Utils 4.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`. | ||
|
||
Pro instalaci Nette Utils 4.0 je potřeba aktualizovat i RobotLoader na verzi 4, pokud jej používáte, a odstranit balíček `nette/finder`: | ||
|
||
```shell | ||
composer remove nette/finder | ||
composer require "nette/utils:^4.0" "nette/robot-loader:^4.0" | ||
``` | ||
|
||
|
||
Finder 4.0 | ||
---------- | ||
|
||
Finder se přestěhoval do balíčku `nette/utils`, viz [#Utils 4.0]. | ||
|
||
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*')`. | ||
|
||
|
||
|
||
|
||
{{priority: -5}} |
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
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,59 @@ | ||
Migrating to Version 4.0 | ||
************************ | ||
|
||
.[note] | ||
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. | ||
|
||
/--comment | ||
Verzí Nette 4.0 se rozumí, že máte tyto balíčky nainstalované ve verze 4.0.*. Ostatní balíčky mohou mít vyšší nebo nižší čísla verzí, kompatibilitu hlídá Composer. | ||
|
||
```json | ||
"require": { | ||
"nette/application": "4.0.*", | ||
"nette/bootstrap": "3.2.*", | ||
"nette/caching": "3.2.*", | ||
"nette/database": "4.0.*", | ||
"nette/forms": "4.0.*", | ||
"nette/http": "4.0.*", | ||
"nette/security": "4.0.*", | ||
}, | ||
``` | ||
\-- | ||
|
||
|
||
Utils 4.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. | ||
|
||
To install Nette Utils 4.0 you need to update RobotLoader to version 4 if you are using it, and remove the `nette/finder` package: | ||
|
||
```shell | ||
composer remove nette/finder | ||
composer require "nette/utils:^4.0" "nette/robot-loader:^4.0" | ||
``` | ||
|
||
|
||
Finder 4.0 | ||
---------- | ||
|
||
Finder has moved to the package `nette/utils`, see [Utils 4.0 |#Utils 4.0]. | ||
|
||
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*')`. | ||
|
||
|
||
{{priority: -5}} |