diff --git a/composer.json b/composer.json index 5e6e5ade2..919007aa7 100644 --- a/composer.json +++ b/composer.json @@ -30,11 +30,13 @@ "murtukov/php-code-generator": "^0.1.5", "phpdocumentor/reflection-docblock": "^5.2", "psr/log": "^1.0", - "symfony/config": "^4.4 || ^5.3", - "symfony/dependency-injection": "^4.4 || ^5.3", + "symfony/config": "^4.4.30 || ^5.3.7", + "symfony/dependency-injection": "^4.4.30 || ^5.3.7", "symfony/event-dispatcher": "^4.4 || ^5.3", "symfony/expression-language": "^4.4 || ^5.3", - "symfony/framework-bundle": "^4.4 || ^5.3", + "symfony/framework-bundle": "^4.4.30 || ^5.3.7", + "symfony/http-foundation": "^4.4.30 || ^5.3.7", + "symfony/http-kernel": "^4.4 || ^5.3", "symfony/options-resolver": "^4.4 || ^5.3", "symfony/property-access": "^4.4 || ^5.3", "webonyx/graphql-php": ">=14.5" @@ -48,22 +50,26 @@ "require-dev": { "doctrine/annotations": "^1.13", "doctrine/orm": "^2.5", + "monolog/monolog": "^1.26.1", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12.58", "phpstan/phpstan-phpunit": "^0.12.11", "phpstan/phpstan-symfony": "^0.12.6", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.5.10", "react/promise": "^2.5", "symfony/asset": "^4.4 || ^5.3", "symfony/browser-kit": "^4.4 || ^5.3", - "symfony/console": "^4.4 || ^5.3", "symfony/css-selector": "^4.4 || ^5.3", + "symfony/console": "^4.4.30 || ^5.3", + "symfony/dom-crawler": "^4.4.30 || ^5.3.7", + "symfony/finder": "^4.4.30 || ^5.3.7", "symfony/monolog-bundle": "^3.7", "symfony/phpunit-bridge": "^6.0", - "symfony/process": "^4.4 || ^5.3", + "symfony/process": "^4.4.30 || ^5.3.7", + "symfony/routing": "^4.4 || ^5.3.7", "symfony/security-bundle": "^4.4 || ^5.3", - "symfony/validator": "^4.4 || ^5.3", - "symfony/var-dumper": "^4.4 || ^5.3", + "symfony/validator": "^4.4.30 || ^5.3.7", + "symfony/var-dumper": "^4.4.30 || ^5.3.7", "symfony/yaml": "^4.4 || ^5.3", "twig/twig": "^2.10|^3.0" }, diff --git a/src/Definition/Argument.php b/src/Definition/Argument.php index 6fd71215c..fe2c5d5a5 100644 --- a/src/Definition/Argument.php +++ b/src/Definition/Argument.php @@ -4,6 +4,7 @@ namespace Overblog\GraphQLBundle\Definition; +use ReturnTypeWillChange; use function array_key_exists; use function count; @@ -42,7 +43,7 @@ public function offsetExists($offset): bool * * @return mixed|null */ - #[\ReturnTypeWillChange] + #[ReturnTypeWillChange] public function offsetGet($offset) { // TODO 1.0: Drop PHP 7.4 support and add mixed return type. diff --git a/src/Definition/Type/CustomScalarType.php b/src/Definition/Type/CustomScalarType.php index 7ab46a301..03518ec1a 100644 --- a/src/Definition/Type/CustomScalarType.php +++ b/src/Definition/Type/CustomScalarType.php @@ -7,6 +7,7 @@ use GraphQL\Type\Definition\CustomScalarType as BaseCustomScalarType; use GraphQL\Type\Definition\ScalarType; use GraphQL\Utils\Utils; +use ReturnTypeWillChange; use function call_user_func; use function is_callable; use function sprintf; @@ -25,6 +26,7 @@ public function __construct(array $config = []) /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function serialize($value) { return $this->call('serialize', $value); @@ -33,6 +35,7 @@ public function serialize($value) /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function parseValue($value) { return $this->call('parseValue', $value); @@ -41,6 +44,7 @@ public function parseValue($value) /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function parseLiteral(/* GraphQL\Language\AST\ValueNode */ $valueNode, array $variables = null) { return $this->call('parseLiteral', $valueNode); diff --git a/src/Upload/Type/GraphQLUploadType.php b/src/Upload/Type/GraphQLUploadType.php index 55b580fc2..abc54104d 100644 --- a/src/Upload/Type/GraphQLUploadType.php +++ b/src/Upload/Type/GraphQLUploadType.php @@ -6,6 +6,7 @@ use GraphQL\Error\InvariantViolation; use GraphQL\Type\Definition\ScalarType; +use ReturnTypeWillChange; use Symfony\Component\HttpFoundation\File\File; use function get_class; use function gettype; @@ -31,6 +32,7 @@ public function __construct(string $name = null) /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function parseValue($value) { if (null !== $value && !$value instanceof File) { diff --git a/src/Validator/Mapping/PropertyMetadata.php b/src/Validator/Mapping/PropertyMetadata.php index a065c8277..63bbd7472 100644 --- a/src/Validator/Mapping/PropertyMetadata.php +++ b/src/Validator/Mapping/PropertyMetadata.php @@ -6,6 +6,7 @@ use ReflectionException; use ReflectionProperty; +use ReturnTypeWillChange; use Symfony\Component\Validator\Mapping\MemberMetadata; class PropertyMetadata extends MemberMetadata @@ -28,6 +29,7 @@ protected function newReflectionMember($object): ReflectionProperty return $member; } + #[ReturnTypeWillChange] public function getPropertyValue($object) { return $this->getReflectionMember($object)->getValue($object); diff --git a/tests/Config/Parser/AnnotationParserTest.php b/tests/Config/Parser/AnnotationParserTest.php index d09259dd1..efc5b6e98 100644 --- a/tests/Config/Parser/AnnotationParserTest.php +++ b/tests/Config/Parser/AnnotationParserTest.php @@ -10,6 +10,9 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +/** + * @group legacy + */ class AnnotationParserTest extends MetadataParserTest { public function setUp(): void diff --git a/tests/Functional/App/Type/YearScalarType.php b/tests/Functional/App/Type/YearScalarType.php index 1819447a0..5d266ae52 100644 --- a/tests/Functional/App/Type/YearScalarType.php +++ b/tests/Functional/App/Type/YearScalarType.php @@ -7,6 +7,7 @@ use GraphQL\Error\Error; use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; +use ReturnTypeWillChange; use function sprintf; use function str_replace; @@ -15,6 +16,7 @@ class YearScalarType extends ScalarType /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function serialize($value) { return sprintf('%s AC', $value); @@ -23,6 +25,7 @@ public function serialize($value) /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function parseValue($value) { return (int) str_replace(' AC', '', $value); @@ -31,6 +34,7 @@ public function parseValue($value) /** * {@inheritdoc} */ + #[ReturnTypeWillChange] public function parseLiteral($valueNode, array $variables = null) { if (!$valueNode instanceof StringValueNode) {