From 6ad64828d25ec4bdf226ec5096aabb04aa710324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Fri, 3 Nov 2023 14:29:10 +0100 Subject: [PATCH] Adds PHP 8.3 as new supported version (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds PHP 8.3 as new supported version Signed-off-by: Stéphane Demonchaux --- .laminas-ci.json | 3 +++ composer.json | 8 ++++---- composer.lock | 4 ++-- psalm-baseline.xml | 3 --- test/Compress/TarTest.php | 5 +++++ test/InflectorTest.php | 1 - test/Word/CamelCaseToSeparatorNoPcreUnicodeTest.php | 11 +++++------ 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.laminas-ci.json b/.laminas-ci.json index 2c63c085..623a8eca 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -1,2 +1,5 @@ { + "ignore_php_platform_requirements": { + "8.3": true + } } diff --git a/composer.json b/composer.json index 8457fcad..83626088 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ } }, "require": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-mbstring": "*", "laminas/laminas-servicemanager": "^3.21.0", "laminas/laminas-stdlib": "^3.13.0" @@ -41,12 +41,12 @@ "laminas/laminas-coding-standard": "~2.5.0", "laminas/laminas-crypt": "^3.10", "laminas/laminas-i18n": "^2.23.1", - "laminas/laminas-uri": "^2.10", + "laminas/laminas-uri": "^2.11", "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^10.2.6", + "phpunit/phpunit": "^10.4.2", "psalm/plugin-phpunit": "^0.18.4", "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.13.1" + "vimeo/psalm": "^5.15.0" }, "conflict": { "laminas/laminas-validator": "<2.10.1", diff --git a/composer.lock b/composer.lock index 4c7fed7d..b45f6abb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f1ed72f5e92c1e061f5bbcbecae1ede9", + "content-hash": "c98a8c71e4369afa11fdc8cbe6de55eb", "packages": [ { "name": "laminas/laminas-servicemanager", @@ -4870,7 +4870,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-mbstring": "*" }, "platform-dev": [], diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 081383ba..e4d003b6 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1799,9 +1799,6 @@ $rules $rules - - UnusedVariable - $filtered $rule diff --git a/test/Compress/TarTest.php b/test/Compress/TarTest.php index 1871922d..76a24bc6 100644 --- a/test/Compress/TarTest.php +++ b/test/Compress/TarTest.php @@ -9,6 +9,7 @@ use PHPUnit\Framework\TestCase; use function dirname; +use function extension_loaded; use function file_exists; use function file_get_contents; use function file_put_contents; @@ -185,6 +186,10 @@ public function testTarCompressDirectory(): void public function testSetModeShouldWorkWithCaseInsensitive(): void { + if (! extension_loaded('bz2')) { + self::markTestSkipped('This adapter needs the bz2 extension'); + } + $filter = new TarCompression(); $filter->setTarget($this->tmp . '/zipextracted.txt'); diff --git a/test/InflectorTest.php b/test/InflectorTest.php index 9b9849ca..3a3304c0 100644 --- a/test/InflectorTest.php +++ b/test/InflectorTest.php @@ -71,7 +71,6 @@ public function testSetTargetByReferenceWorks(): void $this->inflector->setTargetReference($target); self::assertSame('foo/:bar/:baz', $this->inflector->getTarget()); /* this variable is used by-ref through `setTargetReference` above */ - /** @psalm-suppress UnusedVariable */ $target .= '/:bat'; self::assertSame('foo/:bar/:baz/:bat', $this->inflector->getTarget()); } diff --git a/test/Word/CamelCaseToSeparatorNoPcreUnicodeTest.php b/test/Word/CamelCaseToSeparatorNoPcreUnicodeTest.php index 5205f50f..b8624913 100644 --- a/test/Word/CamelCaseToSeparatorNoPcreUnicodeTest.php +++ b/test/Word/CamelCaseToSeparatorNoPcreUnicodeTest.php @@ -5,7 +5,7 @@ namespace LaminasTest\Filter\Word; use Laminas\Stdlib\StringUtils; -use ReflectionProperty; +use ReflectionClass; /** * Test class for Laminas\Filter\Word\CamelCaseToSeparator which simulates the @@ -13,20 +13,19 @@ */ class CamelCaseToSeparatorNoPcreUnicodeTest extends CamelCaseToSeparatorTest { - protected ReflectionProperty $reflection; - public function setUp(): void { if (! StringUtils::hasPcreUnicodeSupport()) { self::markTestSkipped('PCRE is not compiled with Unicode support'); } - $this->reflection = new ReflectionProperty(StringUtils::class, 'hasPcreUnicodeSupport'); - $this->reflection->setValue(false); + $reflectionClass = new ReflectionClass(StringUtils::class); + $reflectionClass->setStaticPropertyValue('hasPcreUnicodeSupport', false); } public function tearDown(): void { - $this->reflection->setValue(true); + $reflectionClass = new ReflectionClass(StringUtils::class); + $reflectionClass->setStaticPropertyValue('hasPcreUnicodeSupport', true); } }