From a0e313732ca3f941d213b26783b025697bfbe67c Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Sun, 5 Apr 2026 12:57:17 -0600 Subject: [PATCH 1/2] Updated to latest vendors --- composer.json | 4 ++-- test/TestCase.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ffa3ffe..a8e139f 100644 --- a/composer.json +++ b/composer.json @@ -16,12 +16,12 @@ "webonyx/graphql-php": "^v15.29", "psr/container": "^2.0", "league/event": "^3.0", - "symfony/var-exporter": "^6.4 || ^7.0" + "symfony/var-exporter": "^6.4 || ^7.0 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^14.0", "doctrine/dbal": "^4.0", - "phpunit/phpunit": "^12.0", + "phpunit/phpunit": "^13.0", "vimeo/psalm": "^6.14", "symfony/cache": "^7.0 || ^8.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", diff --git a/test/TestCase.php b/test/TestCase.php index ed98387..4f1eeaa 100644 --- a/test/TestCase.php +++ b/test/TestCase.php @@ -29,6 +29,7 @@ public function setUp(): void paths: [__DIR__ . '/Entity'], isDevMode: true, ); + $config->enableNativeLazyObjects(true); // database connection $connection = DriverManager::getConnection([ From 36f8a2262ba5e354291f73e2209a7298457300d2 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Sun, 5 Apr 2026 13:06:35 -0600 Subject: [PATCH 2/2] Resoved deprecation warning and Proxy object->_load --- src/Resolve/FieldResolver.php | 2 ++ test/Feature/Metadata/GlobalByValueTest.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/Resolve/FieldResolver.php b/src/Resolve/FieldResolver.php index 19ff618..9f14e5a 100644 --- a/src/Resolve/FieldResolver.php +++ b/src/Resolve/FieldResolver.php @@ -42,7 +42,9 @@ public function __invoke(mixed $source, mixed $args, mixed $context, ResolveInfo // Proxy objects cannot hydrate by reference without loading if ($source instanceof Proxy) { + // @codeCoverageIgnoreStart $source->__load(); + // @codeCoverageIgnoreEnd } $defaultProxyClassNameResolver = new DefaultProxyClassNameResolver(); diff --git a/test/Feature/Metadata/GlobalByValueTest.php b/test/Feature/Metadata/GlobalByValueTest.php index 697f8bf..694be09 100644 --- a/test/Feature/Metadata/GlobalByValueTest.php +++ b/test/Feature/Metadata/GlobalByValueTest.php @@ -11,9 +11,11 @@ use GraphQL\GraphQL; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Schema; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; class GlobalByValueTest extends TestCase { + #[IgnoreDeprecations] public function testGlobalByValueGlobalEnableFalse(): void { $driver = new Driver($this->getEntityManager(), new Config([ @@ -57,6 +59,7 @@ public function testGlobalByValueGlobalEnableFalse(): void $this->assertFalse($driver->get(Config::class)->getGlobalByValue()); } + #[IgnoreDeprecations] public function testGlobalByValueFalse(): void { $driver = new Driver($this->getEntityManager(), new Config(['globalByValue' => false]));