From 82526171808f67379c519aca84677040e81f00e3 Mon Sep 17 00:00:00 2001 From: "@mpyw" Date: Sun, 14 Dec 2025 23:16:09 +0900 Subject: [PATCH 1/4] [Claude] Add PHP 8.5 to CI test matrix --- .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 dc46de4..968ac17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] laravel: [^11.0, ^12.0, ^13.0.x-dev] exclude: - php: 8.2 From 7288a41c13f04b6cb0230fed26853fcffff710dc Mon Sep 17 00:00:00 2001 From: "@mpyw" Date: Mon, 15 Dec 2025 03:45:53 +0900 Subject: [PATCH 2/4] Fix union type order for php-cs-fixer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/SystemVariableAssigner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SystemVariableAssigner.php b/src/SystemVariableAssigner.php index 64f4dca..5efa753 100644 --- a/src/SystemVariableAssigner.php +++ b/src/SystemVariableAssigner.php @@ -32,7 +32,7 @@ class SystemVariableAssigner /** * @phpstan-ignore-next-line parameterByRef.unusedType */ - public function __construct(null|Closure|PDO &...$pdos) + public function __construct(Closure|PDO|null &...$pdos) { $this->pdos = array_filter($pdos); } From c7759533cbae85614f78837530bf349459facd15 Mon Sep 17 00:00:00 2001 From: "@mpyw" Date: Mon, 15 Dec 2025 04:22:03 +0900 Subject: [PATCH 3/4] Fix PHPStan return type error in Value::as() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change return type from ExpressionInterface to ValueInterface since the method always returns a Value instance (which implements ValueInterface). This fixes the PHPStan error in selectOriginalVariables() which expects array but was receiving array. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/Value.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Value.php b/src/Value.php index 677171b..911a7ff 100644 --- a/src/Value.php +++ b/src/Value.php @@ -67,7 +67,7 @@ public static function str(string $value) * * @param bool|float|int|string $value */ - public static function as(string $type, $value): ExpressionInterface + public static function as(string $type, $value): ValueInterface { switch ($type) { case static::TYPE_INTEGER: From 32b6a86e46dec5e3ff9a3e2370dc10f8f4e61570 Mon Sep 17 00:00:00 2001 From: "@mpyw" Date: Mon, 15 Dec 2025 04:24:57 +0900 Subject: [PATCH 4/4] Fix PHPUnit 12 data provider syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace @dataProvider annotation with #[DataProvider] attribute as required by PHPUnit 12. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- tests/BasicVariableAssignmentTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/BasicVariableAssignmentTest.php b/tests/BasicVariableAssignmentTest.php index d2c174d..a339060 100644 --- a/tests/BasicVariableAssignmentTest.php +++ b/tests/BasicVariableAssignmentTest.php @@ -8,16 +8,16 @@ use Mpyw\LaravelMySqlSystemVariableManager\MySqlConnection; use Mpyw\LaravelMySqlSystemVariableManager\Replacer; use Mpyw\LaravelMySqlSystemVariableManager\Value; +use PHPUnit\Framework\Attributes\DataProvider; class BasicVariableAssignmentTest extends TestCase { /** - * @test * @param mixed $expectedOriginal * @param mixed $newValue * @param mixed $expectedChanged - * @dataProvider provideBasicVariables */ + #[DataProvider('provideBasicVariables')] public function testAssignments(string $variableName, bool $emulated, $expectedOriginal, $newValue, $expectedChanged): void { $this->{$emulated ? 'onEmulatedConnection' : 'onNativeConnection'}(function (MySqlConnection $db) use ($variableName, $expectedOriginal, $newValue, $expectedChanged): void { @@ -28,12 +28,11 @@ public function testAssignments(string $variableName, bool $emulated, $expectedO } /** - * @test * @param mixed $expectedOriginal * @param mixed $newValue * @param mixed $expectedChanged - * @dataProvider provideBasicVariables */ + #[DataProvider('provideBasicVariables')] public function testTemporaryAssignments(string $variableName, bool $emulated, $expectedOriginal, $newValue, $expectedChanged): void { $this->{$emulated ? 'onEmulatedConnection' : 'onNativeConnection'}(function (MySqlConnection $db) use ($variableName, $expectedOriginal, $newValue, $expectedChanged): void {