From e0d15cdabcd72f8e0e2526b1212c749543eb9a33 Mon Sep 17 00:00:00 2001 From: Zaher Ghaibeh Date: Sun, 23 Apr 2023 13:19:15 +0300 Subject: [PATCH 1/3] fix the date change in .cl domains --- src/Iodev/Whois/Helpers/DateHelper.php | 2 + .../Tld/parsing_data/.cl/google.cl.txt | 54 ++++++++----------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/src/Iodev/Whois/Helpers/DateHelper.php b/src/Iodev/Whois/Helpers/DateHelper.php index 378fc4b1..09850fe7 100644 --- a/src/Iodev/Whois/Helpers/DateHelper.php +++ b/src/Iodev/Whois/Helpers/DateHelper.php @@ -36,6 +36,8 @@ public static function parseDate($datestamp, $inverseMMDD = false) : "{$m[3]}-{$m[1]}-{$m[2]}T00:00:00"; } elseif (preg_match('/^(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})\s+\(GMT([-+]\d+:\d{2})\)$/ui', $s, $m)) { $s = "{$m[1]}T{$m[2]}{$m[3]}"; + } elseif (preg_match('/(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})\s+(CLST)$/ui', $s, $m)) { + $s = "{$m[1]}T{$m[2]}"; } return (int)strtotime($s); } diff --git a/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt b/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt index ccbc7283..0b276168 100644 --- a/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt +++ b/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt @@ -1,31 +1,23 @@ -google.cl: - -ACE: google.cl (RFC-3490, RFC-3491, RFC-3492) - -Google Inc. - -Contacto Administrativo (Administrative Contact): - Nombre : MarkMonitor Inc. - Organización: - -Contacto Técnico (Technical Contact): - Nombre : MarkMonitor Inc. - Organización: - -Servidores de nombre (Domain servers): - ns3.google.net - ns4.google.net - ns1.google.net - ns2.google.net - - -Fecha de expiración (Expiration date): 2018-11-20 14:48:02 CLT - -Agente Registrador (Registrar): - MarkMonitor Inc. - -Más información (More information): - http://www.nic.cl/registry/Whois.do?d=google.cl - -Este mensajes está impreso en ISO-8859-1 -(This message is printed in ISO-8859-1) +%% +%% This is the NIC Chile Whois server (whois.nic.cl). +%% +%% Rights restricted by copyright. +%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf +%% + +Domain name: google.cl +Registrant name: Google LLC +Registrant organisation: Google LLC +Registrar name: MarkMonitor Inc. +Registrar URL: https://markmonitor.com/ +Creation date: 2002-10-22 17:48:23 CLST +Expiration date: 2023-11-20 14:48:02 CLST +Name server: ns1.google.com +Name server: ns2.google.com +Name server: ns3.google.com +Name server: ns4.google.com + +%% +%% For communication with domain contacts please use website. +%% See https://www.nic.cl/registry/Whois.do?d=google.cl +%% \ No newline at end of file From ccb04b85c65466694a6d726caa988dc30a395fb0 Mon Sep 17 00:00:00 2001 From: Zaher Ghaibeh Date: Sun, 23 Apr 2023 14:33:54 +0300 Subject: [PATCH 2/3] update gh actions --- .github/workflows/tests.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e04312c5..c37a5b2d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,19 @@ jobs: php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 1 - - run: php${{ matrix.php-version }} -v - - run: php${{ matrix.php-version }} -m - - run: composer -V - - run: composer install + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Install Composer dependencies + uses: ramsey/composer-install@v2 + with: + composer-options: "--no-progress --prefer-dist --optimize-autoloader" + - run: php${{ matrix.php-version }} vendor/bin/phpunit --bootstrap tests/bootstrap.php tests From fd75f6134c4d08e6acd8741be3b6cc6eb608b0c3 Mon Sep 17 00:00:00 2001 From: Zaher Ghaibeh Date: Sun, 23 Apr 2023 14:35:01 +0300 Subject: [PATCH 3/3] wip --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c37a5b2d..b17c0690 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,8 @@ on: [push, pull_request] jobs: php-intl: - runs-on: ubuntu-18.04 + name: PHP-${{ matrix.php-version }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: