Skip to content

Commit 635da39

Browse files
authored
Merge pull request #952 from ruudk/move-to-0.14
Fix deprecations in 0.14
2 parents 8d5a5aa + f92a90e commit 635da39

File tree

7 files changed

+31
-9
lines changed

7 files changed

+31
-9
lines changed

composer.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
"murtukov/php-code-generator": "^0.1.5",
3131
"phpdocumentor/reflection-docblock": "^5.2",
3232
"psr/log": "^1.0",
33-
"symfony/config": "^4.4 || ^5.3",
34-
"symfony/dependency-injection": "^4.4 || ^5.3",
33+
"symfony/config": "^4.4.30 || ^5.3.7",
34+
"symfony/dependency-injection": "^4.4.30 || ^5.3.7",
3535
"symfony/event-dispatcher": "^4.4 || ^5.3",
3636
"symfony/expression-language": "^4.4 || ^5.3",
37-
"symfony/framework-bundle": "^4.4 || ^5.3",
37+
"symfony/framework-bundle": "^4.4.30 || ^5.3.7",
38+
"symfony/http-foundation": "^4.4.30 || ^5.3.7",
39+
"symfony/http-kernel": "^4.4 || ^5.3",
3840
"symfony/options-resolver": "^4.4 || ^5.3",
3941
"symfony/property-access": "^4.4 || ^5.3",
4042
"webonyx/graphql-php": ">=14.5"
@@ -48,22 +50,26 @@
4850
"require-dev": {
4951
"doctrine/annotations": "^1.13",
5052
"doctrine/orm": "^2.5",
53+
"monolog/monolog": "^1.26.1",
5154
"phpstan/extension-installer": "^1.0",
5255
"phpstan/phpstan": "^0.12.58",
5356
"phpstan/phpstan-phpunit": "^0.12.11",
5457
"phpstan/phpstan-symfony": "^0.12.6",
55-
"phpunit/phpunit": "^9.5",
58+
"phpunit/phpunit": "^9.5.10",
5659
"react/promise": "^2.5",
5760
"symfony/asset": "^4.4 || ^5.3",
5861
"symfony/browser-kit": "^4.4 || ^5.3",
59-
"symfony/console": "^4.4 || ^5.3",
6062
"symfony/css-selector": "^4.4 || ^5.3",
63+
"symfony/console": "^4.4.30 || ^5.3",
64+
"symfony/dom-crawler": "^4.4.30 || ^5.3.7",
65+
"symfony/finder": "^4.4.30 || ^5.3.7",
6166
"symfony/monolog-bundle": "^3.7",
6267
"symfony/phpunit-bridge": "^6.0",
63-
"symfony/process": "^4.4 || ^5.3",
68+
"symfony/process": "^4.4.30 || ^5.3.7",
69+
"symfony/routing": "^4.4 || ^5.3.7",
6470
"symfony/security-bundle": "^4.4 || ^5.3",
65-
"symfony/validator": "^4.4 || ^5.3",
66-
"symfony/var-dumper": "^4.4 || ^5.3",
71+
"symfony/validator": "^4.4.30 || ^5.3.7",
72+
"symfony/var-dumper": "^4.4.30 || ^5.3.7",
6773
"symfony/yaml": "^4.4 || ^5.3",
6874
"twig/twig": "^2.10|^3.0"
6975
},

src/Definition/Argument.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Overblog\GraphQLBundle\Definition;
66

7+
use ReturnTypeWillChange;
78
use function array_key_exists;
89
use function count;
910

@@ -42,7 +43,7 @@ public function offsetExists($offset): bool
4243
*
4344
* @return mixed|null
4445
*/
45-
#[\ReturnTypeWillChange]
46+
#[ReturnTypeWillChange]
4647
public function offsetGet($offset)
4748
{
4849
// TODO 1.0: Drop PHP 7.4 support and add mixed return type.

src/Definition/Type/CustomScalarType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use GraphQL\Type\Definition\CustomScalarType as BaseCustomScalarType;
88
use GraphQL\Type\Definition\ScalarType;
99
use GraphQL\Utils\Utils;
10+
use ReturnTypeWillChange;
1011
use function call_user_func;
1112
use function is_callable;
1213
use function sprintf;
@@ -25,6 +26,7 @@ public function __construct(array $config = [])
2526
/**
2627
* {@inheritdoc}
2728
*/
29+
#[ReturnTypeWillChange]
2830
public function serialize($value)
2931
{
3032
return $this->call('serialize', $value);
@@ -33,6 +35,7 @@ public function serialize($value)
3335
/**
3436
* {@inheritdoc}
3537
*/
38+
#[ReturnTypeWillChange]
3639
public function parseValue($value)
3740
{
3841
return $this->call('parseValue', $value);
@@ -41,6 +44,7 @@ public function parseValue($value)
4144
/**
4245
* {@inheritdoc}
4346
*/
47+
#[ReturnTypeWillChange]
4448
public function parseLiteral(/* GraphQL\Language\AST\ValueNode */ $valueNode, array $variables = null)
4549
{
4650
return $this->call('parseLiteral', $valueNode);

src/Upload/Type/GraphQLUploadType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use GraphQL\Error\InvariantViolation;
88
use GraphQL\Type\Definition\ScalarType;
9+
use ReturnTypeWillChange;
910
use Symfony\Component\HttpFoundation\File\File;
1011
use function get_class;
1112
use function gettype;
@@ -31,6 +32,7 @@ public function __construct(string $name = null)
3132
/**
3233
* {@inheritdoc}
3334
*/
35+
#[ReturnTypeWillChange]
3436
public function parseValue($value)
3537
{
3638
if (null !== $value && !$value instanceof File) {

src/Validator/Mapping/PropertyMetadata.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use ReflectionException;
88
use ReflectionProperty;
9+
use ReturnTypeWillChange;
910
use Symfony\Component\Validator\Mapping\MemberMetadata;
1011

1112
class PropertyMetadata extends MemberMetadata
@@ -28,6 +29,7 @@ protected function newReflectionMember($object): ReflectionProperty
2829
return $member;
2930
}
3031

32+
#[ReturnTypeWillChange]
3133
public function getPropertyValue($object)
3234
{
3335
return $this->getReflectionMember($object)->getValue($object);

tests/Config/Parser/AnnotationParserTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1111
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
1212

13+
/**
14+
* @group legacy
15+
*/
1316
class AnnotationParserTest extends MetadataParserTest
1417
{
1518
public function setUp(): void

tests/Functional/App/Type/YearScalarType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use GraphQL\Error\Error;
88
use GraphQL\Language\AST\StringValueNode;
99
use GraphQL\Type\Definition\ScalarType;
10+
use ReturnTypeWillChange;
1011
use function sprintf;
1112
use function str_replace;
1213

@@ -15,6 +16,7 @@ class YearScalarType extends ScalarType
1516
/**
1617
* {@inheritdoc}
1718
*/
19+
#[ReturnTypeWillChange]
1820
public function serialize($value)
1921
{
2022
return sprintf('%s AC', $value);
@@ -23,6 +25,7 @@ public function serialize($value)
2325
/**
2426
* {@inheritdoc}
2527
*/
28+
#[ReturnTypeWillChange]
2629
public function parseValue($value)
2730
{
2831
return (int) str_replace(' AC', '', $value);
@@ -31,6 +34,7 @@ public function parseValue($value)
3134
/**
3235
* {@inheritdoc}
3336
*/
37+
#[ReturnTypeWillChange]
3438
public function parseLiteral($valueNode, array $variables = null)
3539
{
3640
if (!$valueNode instanceof StringValueNode) {

0 commit comments

Comments
 (0)