From 1d5d747c6aa796179401498c8e37e700f716c11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niko=20Gran=C3=B6?= Date: Tue, 1 Sep 2020 14:14:40 +0300 Subject: [PATCH 1/4] Support Ficora --- .../ficoraEppDnssecUpdateDomainRequest.php | 29 +++++++++++++++++++ .../EPP/eppExtensions/ficora/includes.php | 3 ++ .../ficoraEppConnection/eppConnection.php | 8 ++--- 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 Protocols/EPP/eppExtensions/ficora/eppRequests/ficoraEppDnssecUpdateDomainRequest.php diff --git a/Protocols/EPP/eppExtensions/ficora/eppRequests/ficoraEppDnssecUpdateDomainRequest.php b/Protocols/EPP/eppExtensions/ficora/eppRequests/ficoraEppDnssecUpdateDomainRequest.php new file mode 100644 index 00000000..3f4efdd6 --- /dev/null +++ b/Protocols/EPP/eppExtensions/ficora/eppRequests/ficoraEppDnssecUpdateDomainRequest.php @@ -0,0 +1,29 @@ +addFicoraExtension(); + $this->addSessionId(); + } + + public function addFicoraExtension(){ + $this->domainobject->setAttribute('xmlns:domain', 'urn:ietf:params:xml:ns:domain-1.0'); + } +} diff --git a/Protocols/EPP/eppExtensions/ficora/includes.php b/Protocols/EPP/eppExtensions/ficora/includes.php index a62f1d0d..7fade022 100644 --- a/Protocols/EPP/eppExtensions/ficora/includes.php +++ b/Protocols/EPP/eppExtensions/ficora/includes.php @@ -30,3 +30,6 @@ include_once(dirname(__FILE__) . '/eppRequests/ficoraEppCreateContactRequest.php'); $this->addCommandResponse('Metaregistrar\EPP\ficoraEppCreateContactRequest', 'Metaregistrar\EPP\eppCreateContactResponse'); + +include_once(dirname(__FILE__). '/eppRequests/ficoraEppDnssecUpdateDomainRequest.php'); +$this->addCommandResponse('Metaregistrar\EPP\ficoraEppDnssecUpdateDomainRequest', 'Metaregistrar\EPP\eppUpdateDomainResponse'); diff --git a/Registries/ficoraEppConnection/eppConnection.php b/Registries/ficoraEppConnection/eppConnection.php index 28584c0a..7deb9230 100644 --- a/Registries/ficoraEppConnection/eppConnection.php +++ b/Registries/ficoraEppConnection/eppConnection.php @@ -6,15 +6,15 @@ class ficoraEppConnection extends eppConnection { public function __construct($logging = false, $settingsfile = null) { // Construct the EPP connection object en specify if you want logging on or off parent::__construct($logging, $settingsfile); - + // Specify timeout values in seconds, test interface is kind of slow parent::setTimeout(200); // Enable DNSSEC, Ficora supports this parent::enableDnssec(); - // Make sure services are not added to the main EPP commands - parent::setServices(null); + // Make sure services are added + parent::setServices([]); // Add the commands and responses specific to this registry // Please make sure the corresponding PHP files are present! @@ -24,4 +24,4 @@ public function __construct($logging = false, $settingsfile = null) { } -} \ No newline at end of file +} From a93466395ef3f62fd070d669aeaf0e773250da17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niko=20Gran=C3=B6?= Date: Tue, 1 Sep 2020 14:20:50 +0300 Subject: [PATCH 2/4] Update composer.json --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0199cfde..9dcfc1e7 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "metaregistrar/php-epp-client", + "name": "finnishtechcompany/php-epp-client", "type": "library", "description": "Object-oriented PHP EPP Client", "keywords": ["xml","epp","domains"], @@ -9,6 +9,10 @@ { "name": "Ewout de Graaf", "email": "ewout@metaregistrar.com" + }, + { + "name": "Fiteco", + "email": "support@fiteco.fi" } ], "require": { From 6968c908fa8927dae9b08b41fb69d8b0d7c41214 Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 17 Dec 2024 07:17:28 +0200 Subject: [PATCH 3/4] fix php 8.x --- Protocols/EPP/eppResponses/eppResponse.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Protocols/EPP/eppResponses/eppResponse.php b/Protocols/EPP/eppResponses/eppResponse.php index 3acec2ff..8921a0ad 100644 --- a/Protocols/EPP/eppResponses/eppResponse.php +++ b/Protocols/EPP/eppResponses/eppResponse.php @@ -79,7 +79,7 @@ class eppResponse extends \DOMDocument { /* * @var array of supported versions */ - public $version; + public ?string $version; public $originalrequest; /** @@ -123,9 +123,9 @@ public function dumpContents() { */ public function Success() { $resultcode = $this->getResultCode(); - $success = ($resultcode{0} == '1'); + $success = ($resultcode[0] == '1'); if (!$success) { - switch ($resultcode{1}) { + switch ($resultcode[1]) { case '0': $this->setProblemtype('syntax'); break; From 8b78a1a126cc16ebdf1d697b509f4157f002f141 Mon Sep 17 00:00:00 2001 From: Niko Date: Wed, 18 Dec 2024 00:58:41 +0200 Subject: [PATCH 4/4] Fix more php 8.x --- Protocols/EPP/eppData/eppContact.php | 2 +- .../at-ext-epp-1.0/eppResponses/atEppResponseTrait.php | 4 ++-- .../sidn-ext-epp-1.0/eppResponses/sidnEppResponse.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Protocols/EPP/eppData/eppContact.php b/Protocols/EPP/eppData/eppContact.php index b44c5bfb..9337fb7a 100644 --- a/Protocols/EPP/eppData/eppContact.php +++ b/Protocols/EPP/eppData/eppContact.php @@ -239,7 +239,7 @@ protected function validatePhoneNumber($number) { if (!strlen($number)) { return null; } - if ($number{0} != '+') { + if ($number[0] != '+') { throw new eppException('Phone number ' . $number . ' is not valid for EPP. Valid format is +cc.nnnnnnnnnnn'); } if (strpos($number, '.') === false) { diff --git a/Protocols/EPP/eppExtensions/at-ext-epp-1.0/eppResponses/atEppResponseTrait.php b/Protocols/EPP/eppExtensions/at-ext-epp-1.0/eppResponses/atEppResponseTrait.php index e96175cc..a1f90c25 100755 --- a/Protocols/EPP/eppExtensions/at-ext-epp-1.0/eppResponses/atEppResponseTrait.php +++ b/Protocols/EPP/eppExtensions/at-ext-epp-1.0/eppResponses/atEppResponseTrait.php @@ -186,9 +186,9 @@ public function getDomainCreateDate() { public function Success() { $resultcode = $this->getResultCode(); - $success = ($resultcode{0} == '1'); + $success = ($resultcode[0] == '1'); if (!$success) { - switch ($resultcode{1}) { + switch ($resultcode[1]) { case '0': $this->setProblemtype('syntax'); break; diff --git a/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppResponses/sidnEppResponse.php b/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppResponses/sidnEppResponse.php index 64c2bba3..55d04dbb 100644 --- a/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppResponses/sidnEppResponse.php +++ b/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppResponses/sidnEppResponse.php @@ -10,9 +10,9 @@ public function Success() { $xpath = $this->xPath(); $result = $xpath->query('/epp:epp/epp:response/epp:result/@code'); $resultcode = $result->item(0)->nodeValue; - $success = ($resultcode{0} == '1'); + $success = ($resultcode[0] == '1'); if (!$success) { - switch ($resultcode{1}) { + switch ($resultcode[1]) { case '0': $this->setProblemtype('syntax'); break;