From 3418c9a7a9130f6a44009abed42f4249b793b0b5 Mon Sep 17 00:00:00 2001 From: "Ing. Petr Suchy" Date: Thu, 31 Oct 2019 21:38:49 +0100 Subject: [PATCH 1/4] *edit - composer.json - Nette 3 support and last versions of libraries *edit - composer.json - xsuchy09/phone - because of Nette 3 support --- composer.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 1a5d25d..ed856f0 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name" : "ipub/form-phone", + "name" : "xsuchy09/form-phone", "type" : "library", "description" : "Forms control for adding phone filed for Nette Framework", "keywords" : ["nette", "form", "phone", "ipub", "ipublikuj", "framework", "tools"], @@ -20,26 +20,26 @@ }, "require": { - "php" : ">=7.0.0", + "php" : ">=7.1.0", - "ipub/phone" : "~1.2", + "xsuchy09/phone" : "^3.0", - "nette/application" : "~2.3@dev", - "nette/di" : "~2.3@dev", - "nette/forms" : "~2.3@dev", - "nette/utils" : "~2.3@dev", + "nette/application" : "^3.0", + "nette/di" : "^3.0", + "nette/forms" : "^3.0", + "nette/utils" : "^3.0", - "latte/latte" : "~2.3@dev" + "latte/latte" : "^2.5" }, "require-dev": { - "nette/bootstrap" : "~2.3@dev", - "nette/mail" : "~2.3@dev", - "nette/safe-stream" : "~2.3@dev", - "nette/robot-loader" : "~2.3@dev", - "nette/tester" : "@dev", + "nette/bootstrap" : "^3.0", + "nette/mail" : "^3.0", + "nette/safe-stream" : "^2.4", + "nette/robot-loader" : "^3.0", + "nette/tester" : "^2.0", - "tracy/tracy" : "@dev", + "tracy/tracy" : "^2.6", "pds/skeleton" : "^1.0" }, From 057d6188dfdc4c905e2391965fa4f37452055584 Mon Sep 17 00:00:00 2001 From: "Ing. Petr Suchy" Date: Thu, 31 Oct 2019 22:21:44 +0100 Subject: [PATCH 2/4] *fix - Nette 3 support and phone-ui support --- src/IPub/FormPhone/Controls/Phone.php | 12 ++++++------ src/IPub/FormPhone/Forms/PhoneValidator.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/IPub/FormPhone/Controls/Phone.php b/src/IPub/FormPhone/Controls/Phone.php index da4dc24..240385c 100644 --- a/src/IPub/FormPhone/Controls/Phone.php +++ b/src/IPub/FormPhone/Controls/Phone.php @@ -319,7 +319,7 @@ public function getValue() * * @return void */ - public function loadHttpData() + public function loadHttpData(): void { $country = $this->getHttpData(Forms\Form::DATA_LINE, '[' . self::FIELD_COUNTRY . ']'); $this->country = ($country === '' || $country === NULL) ? NULL : (string) $country; @@ -331,7 +331,7 @@ public function loadHttpData() /** * @return Utils\Html */ - public function getControl() + public function getControl(): Utils\Html { $el = Utils\Html::el(); $el->addHtml($this->getControlPart(self::FIELD_COUNTRY) . $this->getControlPart(self::FIELD_NUMBER)); @@ -340,11 +340,11 @@ public function getControl() } /** - * @return Utils\Html + * @return Utils\Html|null * * @throws Exceptions\InvalidArgumentException */ - public function getControlPart() + public function getControlPart(): ?Utils\Html { $args = func_get_args(); $key = reset($args); @@ -442,7 +442,7 @@ public function getControlPart() /** * {@inheritdoc} */ - public function getLabel($caption = NULL) + public function getLabel($caption = NULL): ?Utils\Html { $label = parent::getLabel($caption); $label->for = $this->getHtmlId() . '-' . self::FIELD_NUMBER; @@ -453,7 +453,7 @@ public function getLabel($caption = NULL) /** * {@inheritdoc} */ - public function getLabelPart() + public function getLabelPart(): ?Utils\Html { return NULL; } diff --git a/src/IPub/FormPhone/Forms/PhoneValidator.php b/src/IPub/FormPhone/Forms/PhoneValidator.php index 49c90f8..4456afc 100644 --- a/src/IPub/FormPhone/Forms/PhoneValidator.php +++ b/src/IPub/FormPhone/Forms/PhoneValidator.php @@ -37,7 +37,7 @@ * * @author Adam Kadlec */ -class PhoneValidator extends Phone\Forms\PhoneValidator +class PhoneValidator extends \IPub\PhoneUI\Forms\PhoneValidator { /** * Define validator calling constant From e670099827b161ba7116ce4ed68c4131dc939a3b Mon Sep 17 00:00:00 2001 From: "Ing. Petr Suchy" Date: Fri, 1 Nov 2019 09:14:52 +0100 Subject: [PATCH 3/4] *edit - composer - require phone-ui library --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index ed856f0..0658c45 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "php" : ">=7.1.0", "xsuchy09/phone" : "^3.0", + "xsuchy09/phone-ui" : "^2.0", "nette/application" : "^3.0", "nette/di" : "^3.0", From a42d456ed521901be0227cb6af4f370018d2282d Mon Sep 17 00:00:00 2001 From: "Ing. Petr Suchy" Date: Fri, 1 Nov 2019 09:41:41 +0100 Subject: [PATCH 4/4] *fix - composer ipub to be valid with pull request --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 0658c45..9c99ac3 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name" : "xsuchy09/form-phone", + "name" : "ipub/form-phone", "type" : "library", "description" : "Forms control for adding phone filed for Nette Framework", "keywords" : ["nette", "form", "phone", "ipub", "ipublikuj", "framework", "tools"], @@ -22,8 +22,8 @@ "require": { "php" : ">=7.1.0", - "xsuchy09/phone" : "^3.0", - "xsuchy09/phone-ui" : "^2.0", + "ipub/phone" : "^3.0", + "ipub/phone-ui" : "^2.0", "nette/application" : "^3.0", "nette/di" : "^3.0",