From cec7f78e19abb23819984dc234e8ebc6f47cad58 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:58:31 +0100 Subject: [PATCH] chore(deps): update phpstan packages to v2 (major) (#171) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.json | 6 +++--- tests/Builder/EnumBuilderTest.php | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 575fa10..603e7c3 100644 --- a/composer.json +++ b/composer.json @@ -25,9 +25,9 @@ "doctrine/coding-standard": "^12.0", "infection/infection": "^0.29.0", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.0" }, "autoload": { diff --git a/tests/Builder/EnumBuilderTest.php b/tests/Builder/EnumBuilderTest.php index 6b0ee77..b4bc591 100644 --- a/tests/Builder/EnumBuilderTest.php +++ b/tests/Builder/EnumBuilderTest.php @@ -8,6 +8,9 @@ use SimPod\GraphQLUtils\Builder\EnumBuilder; use SimPod\GraphQLUtils\Exception\InvalidArgument; +use function assert; +use function is_array; + final class EnumBuilderTest extends TestCase { public function testCreate(): void @@ -31,16 +34,20 @@ public function testCreate(): void self::assertCount(4, $values); self::assertArrayHasKey('EnumName', $values); + assert(is_array($values['EnumName'])); self::assertSame('Value1', $values['EnumName']['value']); self::assertArrayHasKey('Value2', $values); + assert(is_array($values['Value2'])); self::assertSame('Value2', $values['Value2']['value']); self::assertSame('Value 2 Description', $values['Value2']['description']); self::assertArrayHasKey('Numeric', $values); + assert(is_array($values['Numeric'])); self::assertSame(0, $values['Numeric']['value']); self::assertArrayHasKey('Deprec', $values); + assert(is_array($values['Deprec'])); self::assertSame('Deprecated', $values['Deprec']['deprecationReason']); }