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/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])); 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([