-
-
Notifications
You must be signed in to change notification settings - Fork 281
/
to-2-3.texy
101 lines (72 loc) 路 3.95 KB
/
to-2-3.texy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
P艡echod na verzi 2.3
********************
Verz铆 Nette 2.3 se rozum铆, 啪e m谩te tyto bal铆膷ky nainstalovan茅 ve verzi 2.3.*:
```json
"require": {
"nette/application": "2.3.*",
"nette/bootstrap": "2.3.*",
"nette/di": "2.3.*",
"nette/forms": "2.3.*",
"nette/http": "2.3.*",
"nette/security": "2.3.*",
},
```
Application
-----------
- routes and presenter names are **case sensitive.** Nette will warn you if you use the wrong case in presenter name. But due to performance limitation it is not checking Route mask - you should check them manually. Correct is `<presenter=UpperCasedDefaultValue>` and `<presenter url-cased-regexp-mask>`.
- `Route::addStyle()` & `Route::setStyleProperty()` are deprecated and now will trigger `E_USER_DEPRECATED`
- unsupported template extension `.phtml` and [old link syntax](https://github.com/nette/application/commit/695158d60fa443e1e65c0e1edebc3af9de1d39b6)
Bootstrap
---------
- removed deprecated constants `Configurator::DEVELOPMENT` and `PRODUCTION`
- `Configurator::setDebugMode()` accepts only bool / string / array
- in config file you can move all sections placed in `nette` to one level up. If you move up one of the sections `container`, `mailer` or `debugger`, rename it to `di`, `mail` and `tracy`.
Caching
-------
- ancient and deprecated ArrayAccess syntax `$val = $cache[$key]` or `$cache[$key] = $val` triggers `E_USER_DEPRECATED`. Use please `$cache->load($key)` and `$cache->save($key, $val)`
Database
--------
- MySqlDriver by default uses utf8mb4 encoding for MySQL >= 5.5.3 instead of utf8 ("see":https://forum.nette.org/en/22055-nette-2-3-0-beta-for-testing#p150705, **maybe it will be reverted**)
- `IReflection` was changed to twins `IStructure` and `IConventions`
- to ensure that new SQL translator do the same job as older one, you can install special tool named `CompatibilityChecker22`
DI
---
- removed support for placing services inside extension section in configuration file
- removed support for dynamically added extensions
- for replacing service dynamically (through removeService, addService calls), newly added service must be instance of same interface/class as original service
Finder
------
* `Finder::filter()` callback always receives as argument (at least) a `FilesystemIterator`
Forms
-----
- internal filtering methods like `Nette\Forms\Controls\TextBase::filterFloat` was removed
- internal validation methods like `Nette\Forms\Controls\TextBase::validateFloat` was moved to `Nette\Forms\Validator`, as well as `Rules::$defaultMessages`
- Buttons and Hidden fields are generated without HTML ID. Relying on autogenerated ID is very bad, if you want ID, set it via `setHtmlId()`
- RadioList items are generated without ID too. You can enable it via `$radioList->generateId = true`. But again: set you base ID via `setHtmlId()`
- filters added via `TextBase::addFilter()` are processed during validation.
- now you can add filters to conditions `$input->addCondition(...)->addFilter(...)`
Http
----
- `Request::getUrl()` is immutable
Mail
----
- if you use variable `$mail` in template, you have to pass it to the template manually
- but better than `{var $mail->subject = "Your new order"}` is this `<title>Your new order</title>`, isn't it?
- if you have linked images (with relative paths) in template, pass base file path to images as second parameter to `setHtmlBody()`
- there is no need to cast templates to `(string)`
RobotLoader
-----------
- is now case sensitive and will warn you if you use the wrong case in class name
SafeStream
----------
- it is recommended to change protocol `safe://...` to namespaced `nette.safe://...`
Tracy
-----
- fasten your belt if you will use Tracy, she is now really fast :-)
Utils
-----
- `Image::from()` throws `ImageException` when is unable to decode file
- `Image::getFormatFromString` is deprecated
- `Strings::chr` and `normalize` now works only with UTF-8 encoding
- `Strings::chr()` throws `Nette\InvalidArgumentException` if code point is not in valid range
{{priority: -5}}