|
10 | 10 | This extension provides following features: |
11 | 11 |
|
12 | 12 | * `Nette\ComponentModel\Container::getComponent()` knows type of the component because it reads the return type on `createComponent*` (this works best in presenters and controls) |
| 13 | +* Array access on components (`$component['name']`) resolves types via `createComponent*` methods |
13 | 14 | * `Nette\DI\Container::getByType` and `createInstance` return type based on first parameter (`Foo::class`). |
14 | 15 | * `Nette\Forms\Container::getValues` return type based on `$asArray` parameter. |
| 16 | +* `Nette\Forms\Container::getUntrustedValues` return type based on mapping class parameter. |
| 17 | +* `Nette\Forms\Controls\BaseControl` fluent methods return `static` instead of `BaseControl`. |
15 | 18 | * `Nette\ComponentModel\Component::lookup` return type based on `$throw` parameter. |
16 | 19 | * `Nette\Application\UI\Component::getPresenter` return type based on `$throw` parameter. |
| 20 | +* `Nette\Application\UI\Presenter::getSession` returns `Session` or `SessionSection` based on arguments. |
17 | 21 | * Dynamic methods of [Nette\Utils\Html](https://doc.nette.org/en/2.4/html-elements) |
18 | 22 | * Magic [Nette\Object and Nette\SmartObject](https://doc.nette.org/en/2.4/php-language-enhancements) properties |
19 | 23 | * Event listeners through the `on*` properties |
| 24 | +* Presenter `@inject` properties are treated as initialized. |
20 | 25 | * Defines early terminating method calls for Presenter methods to prevent `Undefined variable` errors |
21 | 26 | * Understand the exact array shape coming from `Nette\Utils\Strings::match()` and `Nette\Utils\Strings::matchAll()` based on pattern |
| 27 | +* `Nette\Utils\Strings::replace()` callback closure parameter type inferred from regex pattern |
22 | 28 |
|
23 | 29 | It also contains these framework-specific rules (can be enabled separately): |
24 | 30 |
|
25 | 31 | * Do not extend Nette\Object, use Nette\SmartObject trait instead |
26 | 32 | * Rethrow exceptions that are always meant to be rethrown (like `AbortException`) |
| 33 | +* Validate regex patterns passed to `Nette\Utils\Strings` methods |
27 | 34 |
|
28 | 35 |
|
29 | 36 | ## Installation |
|
0 commit comments