From 5c59868e9e6943e354ca9638b79772aa4ae4c668 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 20 Jan 2023 11:21:04 +0545 Subject: [PATCH] Skip GMT+n timezone test cases on PHP 8.1.14 and 8.2.1 --- tests/VObject/TimeZoneUtilTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/VObject/TimeZoneUtilTest.php b/tests/VObject/TimeZoneUtilTest.php index 4df91572c..034031866 100644 --- a/tests/VObject/TimeZoneUtilTest.php +++ b/tests/VObject/TimeZoneUtilTest.php @@ -181,6 +181,17 @@ public function testTimeZoneIdentifiers($tzid) */ public function testTimeZoneBCIdentifiers($tzid) { + /* + * A regression was introduced in PHP 8.1.14 and 8.2.1 + * Timezone ids containing a "+" like "GMT+10" do not work. + * See https://github.com/php/php-src/issues/10218 + * The regression should be fixed in the next patch releases of PHP + * that should be released in Feb 2023. + */ + $versionOfPHP = \phpversion(); + if ((('8.1.14' == $versionOfPHP) || ('8.2.1' == $versionOfPHP)) && \str_contains($tzid, '+')) { + $this->markTestSkipped("Timezone ids containing '+' do not work on PHP $versionOfPHP"); + } $tz = TimeZoneUtil::getTimeZone($tzid); $ex = new \DateTimeZone($tzid);