diff --git a/composer.json b/composer.json index cc516f39..0a8c0e52 100755 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "silverstripe-vendormodule", "license": "BSD-3-Clause", "require": { - "php": "^8.1", + "php": "^8.3", "silverstripe/framework": "^6", "silverstripe/vendor-plugin": "^2", "webonyx/graphql-php": "^15.0.1", diff --git a/tests/Schema/IntegrationTest.php b/tests/Schema/IntegrationTest.php index c563abe4..70a5df58 100644 --- a/tests/Schema/IntegrationTest.php +++ b/tests/Schema/IntegrationTest.php @@ -43,7 +43,7 @@ use GraphQL\Validator\Rules\QueryComplexity; use GraphQL\Validator\Rules\QueryDepth; use GraphQL\Validator\ValidationContext; -use ReflectionProperty; +use ReflectionClass; class IntegrationTest extends SapphireTest { @@ -1688,11 +1688,10 @@ public function testGlobalRuleNotRemoved() private function removeDocumentValidatorRule(string $ruleName): void { - $reflectionRules = new ReflectionProperty(DocumentValidator::class, 'rules'); - $reflectionRules->setAccessible(true); - $rules = $reflectionRules->getValue(); + $reflectionValidator = new ReflectionClass(DocumentValidator::class); + $rules = $reflectionValidator->getStaticPropertyValue('rules'); unset($rules[$ruleName]); - $reflectionRules->setValue($rules); + $reflectionValidator->setStaticPropertyValue('rules', $rules); } private function createProviderForComplexityOrDepth(int $limit): array