Skip to content

Commit b5fc672

Browse files
authored
Merge pull request #71 from moufmouf/symfony51deprecations
Enabling Symfony test listener to see deprecations
2 parents 8cd04b9 + dd0f2f6 commit b5fc672

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

Resources/config/container/graphqlite.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<service id="TheCodingMachine\GraphQLite\AggregateControllerQueryProviderFactory">
3333
<argument type="collection">
3434
</argument>
35+
<argument type="service" id="service_container">
36+
</argument>
3537
<tag name="graphql.queryprovider_factory" />
3638
</service>
3739

Tests/GraphqliteTestingKernel.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler;
1313
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
1414
use Symfony\Component\HttpKernel\Kernel;
15+
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
1516
use Symfony\Component\Routing\RouteCollectionBuilder;
1617
use TheCodingMachine\Graphqlite\Bundle\GraphqliteBundle;
1718
use Symfony\Component\Security\Core\User\User;
@@ -82,6 +83,10 @@ public function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
8283
'app' => 'cache.adapter.array',
8384
];
8485

86+
$frameworkConf['router'] =[
87+
'utf8' => true,
88+
];
89+
8590
if ($this->enableSession) {
8691
$frameworkConf['session'] =[
8792
'enabled' => true,
@@ -163,7 +168,8 @@ public function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
163168
$loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
164169
}
165170

166-
protected function configureRoutes(RouteCollectionBuilder $routes)
171+
// Note: typing is disabled because using different classes in Symfony 4 and 5
172+
protected function configureRoutes(/*RoutingConfigurator*/ $routes)
167173
{
168174
$routes->import(__DIR__.'/../Resources/config/routes.xml');
169175
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"phpunit/phpunit": "^7.5.1",
3737
"phpstan/phpstan": "^0.12.25",
3838
"beberlei/porpaginas": "^1.2",
39-
"php-coveralls/php-coveralls": "^2.1.0"
39+
"php-coveralls/php-coveralls": "^2.1.0",
40+
"symfony/phpunit-bridge": "^5.1"
4041
},
4142
"scripts": {
4243
"phpstan": "phpstan analyse GraphqliteBundle.php DependencyInjection/ Controller/ Resources/ Security/ -c phpstan.neon --level=7 --no-progress"

phpunit.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@
3333
<log type="coverage-html" target="build/coverage"/>
3434
<log type="coverage-clover" target="build/logs/clover.xml"/>
3535
</logging>
36+
37+
<listeners>
38+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
39+
</listeners>
3640
</phpunit>

0 commit comments

Comments
 (0)