Skip to content

Commit 2df8d62

Browse files
committed
compatibility with nette/component-model 3.0
1 parent d957b5e commit 2df8d62

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"require": {
1717
"php": ">=7.1",
18-
"nette/component-model": "^2.3",
18+
"nette/component-model": "^3.0",
1919
"nette/http": "^3.0",
2020
"nette/utils": "^2.4 || ^3.0"
2121
},
@@ -26,7 +26,7 @@
2626
"require-dev": {
2727
"nette/tester": "^2.0",
2828
"nette/di": "^2.4 || ~3.0.0",
29-
"nette/forms": "^2.4",
29+
"nette/forms": "^3.0",
3030
"nette/robot-loader": "^2.4.2 || ^3.0",
3131
"nette/security": "^3.0",
3232
"latte/latte": "^2.4.3",

src/Application/UI/Component.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ public function getUniqueId()
5656
/**
5757
* This method will be called when the component (or component's parent)
5858
* becomes attached to a monitored object. Do not call this method yourself.
59-
* @param Nette\ComponentModel\IComponent
60-
* @return void
6159
*/
62-
protected function attached($presenter)
60+
protected function attached(Nette\ComponentModel\IComponent $presenter): void
6361
{
6462
if ($presenter instanceof Presenter) {
6563
$this->loadState($presenter->popGlobalParameters($this->getUniqueId()));
@@ -68,10 +66,7 @@ protected function attached($presenter)
6866
}
6967

7068

71-
/**
72-
* @return void
73-
*/
74-
protected function validateParent(Nette\ComponentModel\IContainer $parent)
69+
protected function validateParent(Nette\ComponentModel\IContainer $parent): void
7570
{
7671
parent::validateParent($parent);
7772
$this->monitor(Presenter::class);

src/Application/UI/Form.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ public function __construct(Nette\ComponentModel\IContainer $parent = NULL, $nam
3232
}
3333

3434

35-
/**
36-
* @return void
37-
*/
38-
protected function validateParent(Nette\ComponentModel\IContainer $parent)
35+
protected function validateParent(Nette\ComponentModel\IContainer $parent): void
3936
{
4037
parent::validateParent($parent);
4138
$this->monitor(Presenter::class);
@@ -56,10 +53,8 @@ public function getPresenter($throw = TRUE)
5653
/**
5754
* This method will be called when the component (or component's parent)
5855
* becomes attached to a monitored object. Do not call this method yourself.
59-
* @param Nette\ComponentModel\IComponent
60-
* @return void
6156
*/
62-
protected function attached($presenter)
57+
protected function attached(Nette\ComponentModel\IComponent $presenter): void
6358
{
6459
if ($presenter instanceof Presenter) {
6560
if (!isset($this->getElementPrototype()->id)) {

src/Application/UI/Multiplier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(callable $factory)
2828
}
2929

3030

31-
protected function createComponent($name)
31+
protected function createComponent(string $name): Nette\ComponentModel\IComponent
3232
{
3333
return ($this->factory)($name, $this);
3434
}

0 commit comments

Comments
 (0)