From 9201e12443254bcdd269d0b5dbdbc8ec284aa802 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 24 Jul 2022 22:28:03 -0400 Subject: [PATCH 1/3] Test using 22.04 again Locally using 22.04 + PHP 8.1 + OpenSSL 3 I don't get the error we were getting in CI previously. Trying this again to see if this problem has been resolved by changes in PHP and OpenSSL. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e84787e53f2..3ab02662b91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: jobs: testsuite: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: From 5731856f412214647ac422ad28c51ac3e7a91198 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 24 Jul 2022 23:12:48 -0400 Subject: [PATCH 2/3] Add another intl variant. --- tests/TestCase/I18n/TimeTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/TestCase/I18n/TimeTest.php b/tests/TestCase/I18n/TimeTest.php index 20c35559baf..9b3c9b4d431 100644 --- a/tests/TestCase/I18n/TimeTest.php +++ b/tests/TestCase/I18n/TimeTest.php @@ -927,6 +927,7 @@ public function assertTimeFormat(string $expected, string $result, string $messa $expected = str_replace([',', '(', ')', ' at', ' م.', ' ه‍.ش.', ' AP', ' AH', ' SAKA', 'à '], '', $expected); $expected = str_replace([' '], ' ', $expected); + $result = str_replace('temps universel coordonné', 'UTC', $result); $result = str_replace('Temps universel coordonné', 'UTC', $result); $result = str_replace('tiempo universal coordinado', 'GMT', $result); $result = str_replace('Coordinated Universal Time', 'GMT', $result); From b98a0dc06838187c65ebfb2af3ae9683de805faa Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 24 Jul 2022 23:17:18 -0400 Subject: [PATCH 3/3] Conditionally skip test that fails because of openssl Ubuntu 22.04 comes with OpenSSL 3, and the specific version that PHP is built against has a bug which has since been fixed but isn't showing up in the images that GitHub has available. See https://github.com/openssl/openssl/issues/18574 and https://github.com/php/php-src/issues/8369 --- tests/TestCase/Http/Client/Auth/OauthTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/TestCase/Http/Client/Auth/OauthTest.php b/tests/TestCase/Http/Client/Auth/OauthTest.php index 09e53b03b1c..f2d03a25e9b 100644 --- a/tests/TestCase/Http/Client/Auth/OauthTest.php +++ b/tests/TestCase/Http/Client/Auth/OauthTest.php @@ -375,10 +375,17 @@ public function testRsaSigningString(): void 'privateKey' => $privateKey, ]; $auth = new Oauth(); - $request = $auth->authentication($request, $options); - - $result = $request->getHeaderLine('Authorization'); - $this->assertSignatureFormat($result); + try { + $request = $auth->authentication($request, $options); + $result = $request->getHeaderLine('Authorization'); + $this->assertSignatureFormat($result); + } catch (RuntimeException $e) { + // Handle 22.04 + OpenSSL bug. This should be safe to remove in the future. + if (strpos($e->getMessage(), 'unexpected eof while reading') !== false) { + $this->markTestSkipped('Skipping because of OpenSSL bug.'); + } + throw $e; + } } public function testRsaSigningInvalidKey(): void