From 40e1b0bc5d20bf48eed364f7f31e94e8c6bdfbeb Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 4 Feb 2017 02:45:49 +0100 Subject: [PATCH 1/2] composer: updated to Nette 3.0 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3702eab..bfa211b 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,8 @@ } }, "require": { - "nette/di" : "^2.4|^2.3", - "nette/forms" : "^2.4|^2.3" + "nette/di" : "^3.0", + "nette/forms" : "^3.0" }, "require-dev": { "nette/tester" : "~1.6.1", From fa1054e1d90f5f92c7970a62faa7e6ae6fc0fc3f Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 4 Feb 2017 02:46:20 +0100 Subject: [PATCH 2/2] fixed compatibility with Nette 3.0 --- src/Controls/NotTranslatableRadioList.php | 2 +- src/Controls/NotTranslatableSelectBox.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controls/NotTranslatableRadioList.php b/src/Controls/NotTranslatableRadioList.php index e17446e..4a92508 100644 --- a/src/Controls/NotTranslatableRadioList.php +++ b/src/Controls/NotTranslatableRadioList.php @@ -29,7 +29,7 @@ class NotTranslatableRadioList extends Nette\Forms\Controls\RadioList * Just remove translations from each option * @return Nette\Forms\Helpers */ - public function getControl() + public function getControl(): Nette\Utils\Html { $input = ChoiceControl::getControl(); $items = $this->getItems(); diff --git a/src/Controls/NotTranslatableSelectBox.php b/src/Controls/NotTranslatableSelectBox.php index dd2dc94..88dd34c 100644 --- a/src/Controls/NotTranslatableSelectBox.php +++ b/src/Controls/NotTranslatableSelectBox.php @@ -25,7 +25,7 @@ class NotTranslatableSelectBox extends Nette\Forms\Controls\SelectBox * @param array $items [description] * @param boolean $useKeys [description] */ - public function setItems(array $items, $useKeys = TRUE) + public function setItems(array $items, bool $useKeys = TRUE) { if (!$useKeys) { $res = array(); @@ -50,7 +50,7 @@ public function setItems(array $items, $useKeys = TRUE) * Just remove translations from each option * @return Nette\Forms\Helpers */ - public function getControl() + public function getControl(): Nette\Utils\Html { $items = $this->getPrompt() === FALSE ? array() : array('' => $this->translate($this->getPrompt())); foreach ($this->options as $key => $value) {