Skip to content

Commit bad5f75

Browse files
committed
Remove unused code
- Remove ExpressionProcessor.php - Remove paths to old generator in phpunit.xml.dist - Remove empty method - Remove code related to old generator from composer.json - Remove unused GraphQL test types - Remove unused method getGlobalNames
1 parent 4be4823 commit bad5f75

File tree

8 files changed

+4
-197
lines changed

8 files changed

+4
-197
lines changed

composer.json

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
"symfony/property-access": "^4.3 || ^5.0",
4040
"webonyx/graphql-php": "^0.13.5"
4141
},
42-
"replace": {
43-
"overblog/graphql-php-generator": "self.version"
44-
},
4542
"suggest": {
4643
"nelmio/cors-bundle": "For more flexibility when using CORS prefight",
4744
"overblog/graphiql-bundle": "If you want to use graphiQL.",

phpunit.xml.dist

-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
<testsuites>
1616
<testsuite name="OverblogGraphQLBundle Test Suite">
1717
<directory>./tests/</directory>
18-
<directory>./lib/*/tests/</directory>
1918
</testsuite>
2019
</testsuites>
2120

2221
<filter>
2322
<whitelist>
2423
<directory>./src</directory>
25-
<directory>./lib/*/src</directory>
2624
</whitelist>
2725
</filter>
2826

src/Config/Processor/ExpressionProcessor.php

-28
This file was deleted.

src/ExpressionLanguage/ExpressionLanguage.php

+2-11
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,13 @@ class ExpressionLanguage extends BaseExpressionLanguage
1616
public const KNOWN_NAMES = ['value', 'args', 'context', 'info', 'object', 'validator', 'errors', 'childrenComplexity', 'typeName', 'fieldName'];
1717
public const EXPRESSION_TRIGGER = '@=';
1818

19-
private array $globalNames = [];
19+
public array $globalNames = [];
2020

21-
/**
22-
* @param $index
23-
* @param $name
24-
*/
25-
public function addGlobalName($index, $name): void
21+
public function addGlobalName(string $index, string $name): void
2622
{
2723
$this->globalNames[$index] = $name;
2824
}
2925

30-
public function getGlobalNames()
31-
{
32-
return $this->globalNames;
33-
}
34-
3526
public function compile($expression, $names = [])
3627
{
3728
return parent::compile($expression, \array_merge($names, $this->globalNames));

src/Resolver/TypeResolver.php

-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ public function resolve($alias): ?Type
5555
return $this->cache[$alias];
5656
}
5757

58-
public function resolveMultiple(): void
59-
{
60-
}
61-
6258
private function string2Type(string $alias): Type
6359
{
6460
if (null !== ($type = $this->wrapTypeIfNeeded($alias))) {

src/Validator/InputValidator.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ private function mapResolverArgs($value, ArgumentInterface $args, $context, Reso
8585

8686
/**
8787
* @param string|array|null $groups
88-
* @param bool $throw
89-
*
90-
* @return ConstraintViolationListInterface|null
9188
*
9289
* @throws ArgumentsValidationException
9390
*/
@@ -128,6 +125,8 @@ protected function buildValidationTree(ValidationNode $rootObject, array $proper
128125
foreach ($propertiesMapping as $property => $params) {
129126
if (!empty($params['cascade']) && isset($args[$property])) {
130127
$options = $params['cascade'];
128+
129+
/** @var ObjectType|InputObjectType $type */
131130
$type = $options['referenceType'];
132131

133132
if ($options['isCollection']) {

tests/Functional/App/config/generator/config.yml

-14
This file was deleted.

tests/Functional/App/config/generator/mapping/Mutation.types.yml

-132
This file was deleted.

0 commit comments

Comments
 (0)