Skip to content

Commit 7e06b51

Browse files
committed
Merge branch '0.11'
2 parents 7f82a05 + 536bf8a commit 7e06b51

File tree

17 files changed

+27
-30
lines changed

17 files changed

+27
-30
lines changed

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"react/promise": "To use ReactPHP promise adapter"
4949
},
5050
"require-dev": {
51-
"phpunit/phpunit": "^5.7.26 || ^6.0",
51+
"phpunit/phpunit": "^5.7.26 || ^6.0 || ^7.2",
5252
"react/promise": "^2.5",
5353
"sensio/framework-extra-bundle": "^3.0",
5454
"symfony/asset": "^3.4 || ^4.0",
@@ -70,9 +70,9 @@
7070
"scripts": {
7171
"test": "bin/phpunit --color=always -v --debug",
7272
"static-analysis": [
73-
"@composer req --ansi --dev 'phpstan/phpstan:^0.10.3'",
74-
"phpstan analyse --ansi -l 1 -c phpstan.neon src",
75-
"@composer rem --ansi --dev phpstan/phpstan"
73+
"@composer req --ansi --dev 'phpstan/phpstan:^0.10.3' 'phpstan/phpstan-phpunit:^0.10.0'",
74+
"phpstan analyse --ansi -l 1 src tests",
75+
"@composer rem --ansi --dev phpstan/phpstan phpstan/phpstan-phpunit"
7676
],
7777
"bench": [
7878
"test -f phpbench.phar || wget https://phpbench.github.io/phpbench/phpbench.phar https://phpbench.github.io/phpbench/phpbench.phar.pubkey",

phpstan.neon

Whitespace-only changes.

phpstan.neon.dist

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
includes:
2+
- vendor/phpstan/phpstan-phpunit/extension.neon
3+
- vendor/phpstan/phpstan-phpunit/rules.neon

phpunit.xml.dist

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
bootstrap="vendor/autoload.php"
1312
>
1413
<testsuites>

src/Definition/ConfigProcessor.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ public function register(ConfigProcessorInterface $configProcessor, $priority =
3434
$this->processors[] = ['processor' => $configProcessor, 'priority' => $priority];
3535
}
3636

37-
public function process(LazyConfig $lazyConfig)
37+
public function getOrderedProcessors()
3838
{
3939
$this->initialize();
40-
foreach ($this->orderedProcessors as $processor) {
40+
41+
return $this->orderedProcessors;
42+
}
43+
44+
public function process(LazyConfig $lazyConfig)
45+
{
46+
foreach ($this->getOrderedProcessors() as $processor) {
4147
$lazyConfig = $processor->process($lazyConfig);
4248
}
4349

tests/Config/Processor/BuilderProcessorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Config;
3+
namespace Overblog\GraphQLBundle\Tests\Config\Processor;
44

55
use Overblog\GraphQLBundle\Config\Processor\BuilderProcessor;
66
use PHPUnit\Framework\TestCase;

tests/Config/Processor/InheritanceProcessorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Config;
3+
namespace Overblog\GraphQLBundle\Tests\Config\Processor;
44

55
use Overblog\GraphQLBundle\Config\Processor\InheritanceProcessor;
66
use PHPUnit\Framework\TestCase;

tests/Definition/ConfigProcessorTest.php

+1-9
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,7 @@ public function testOrderByPriorityDesc()
3939
return [];
4040
}));
4141

42-
$getOrderedProcessors = \Closure::bind(
43-
function () {
44-
return $this->orderedProcessors;
45-
},
46-
$configProcessor,
47-
\get_class($configProcessor)
48-
);
49-
50-
$processors = $getOrderedProcessors();
42+
$processors = $configProcessor->getOrderedProcessors();
5143

5244
$this->assertSame(
5345
$processors,

tests/DependencyInjection/Compiler/ResolverTestService.php

-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ class ResolverTestService implements ContainerAwareInterface
1212
{
1313
use ContainerAwareTrait;
1414

15-
public function __construct($service)
16-
{
17-
}
18-
1915
public function doSomethingWithContainer()
2016
{
2117
return $this->container->get('injected_service')->doSomething();

tests/Executor/Promise/Adapter/ReactPromiseAdapterTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Error;
3+
namespace Overblog\GraphQLBundle\Tests\Executor\Promise\Adapter;
44

55
use GraphQL\Executor\Promise\Promise;
66
use Overblog\GraphQLBundle\Executor\Promise\Adapter\ReactPromiseAdapter;

tests/ExpressionLanguage/TestCase.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Overblog\GraphQLBundle\Definition\GlobalVariables;
66
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionLanguage;
77
use Overblog\GraphQLBundle\Tests\DIContainerMockTrait;
8+
use PHPUnit\Framework\MockObject\Stub;
89
use PHPUnit\Framework\TestCase as BaseTestCase;
910
use Symfony\Component\ExpressionLanguage\ExpressionFunction;
1011
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
@@ -50,7 +51,7 @@ private function getAuthorizationCheckerIsGrantedWithExpectation($with, $expects
5051
}
5152
$authChecker = $this->getAuthorizationCheckerMock();
5253

53-
if ($return instanceof \PHPUnit_Framework_MockObject_Stub_Return) {
54+
if ($return instanceof Stub) {
5455
$returnValue = $return;
5556
} else {
5657
$returnValue = $this->returnValue($return);

tests/Functional/ArgumentWrapper/ArgumentWrapperTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Functional\AutoMapping;
3+
namespace Overblog\GraphQLBundle\Tests\Functional\ArgumentWrapper;
44

55
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
66

tests/Functional/Inheritance/InheritanceTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Functional\Relay\Connection;
3+
namespace Overblog\GraphQLBundle\Tests\Functional\Inheritance;
44

55
use Overblog\GraphQLBundle\Config\Processor\InheritanceProcessor;
66
use Overblog\GraphQLBundle\Tests\Functional\TestCase;

tests/Functional/SchemaLanguage/SchemaLanguageTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Functional\Security;
3+
namespace Overblog\GraphQLBundle\Tests\Functional\SchemaLanguage;
44

55
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
66

tests/Functional/Type/CustomScalarTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Functional\Security;
3+
namespace Overblog\GraphQLBundle\Tests\Functional\Type;
44

55
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
66

tests/Functional/Type/DefinitionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Functional\Security;
3+
namespace Overblog\GraphQLBundle\Tests\Functional\Type;
44

55
use GraphQL\Type\Definition\EnumType;
66
use GraphQL\Type\Definition\ObjectType;

tests/Relay/Mutation/MutationFieldDefinitionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Overblog\GraphQLBundle\Tests\Relay\Node;
3+
namespace Overblog\GraphQLBundle\Tests\Relay\Mutation;
44

55
use Overblog\GraphQLBundle\Relay\Mutation\MutationFieldDefinition;
66
use PHPUnit\Framework\TestCase;

0 commit comments

Comments
 (0)