Skip to content

Commit 177137b

Browse files
authored
Merge pull request #2 from moufmouf/migrating_to_v4
Upgrading to tdbm-graphql v4
2 parents da3bfe2 + 978b1b4 commit 177137b

File tree

7 files changed

+8
-45
lines changed

7 files changed

+8
-45
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/composer.lock
33
/build
44
/var
5-
/cache
5+
/cache
6+
.phpunit.result.cache

.phpunit.result.cache

Lines changed: 0 additions & 1 deletion
This file was deleted.

DependencyInjection/Configuration.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

DependencyInjection/TdbmGraphqlExtension.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Symfony\Component\DependencyInjection\ContainerBuilder;
99
use Symfony\Component\DependencyInjection\Extension\Extension;
1010
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
11-
use TheCodingMachine\Tdbm\GraphQL\GraphQLTypeAnnotator;
1211

1312
class TdbmGraphqlExtension extends Extension
1413
{
@@ -20,14 +19,7 @@ class TdbmGraphqlExtension extends Extension
2019
*/
2120
public function load(array $configs, ContainerBuilder $container)
2221
{
23-
$configuration = new Configuration();
24-
$config = $this->processConfiguration($configuration, $configs);
25-
2622
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/container'));
2723
$loader->load('tdbmgraphql.xml');
28-
29-
$definition = $container->getDefinition(GraphQLTypeAnnotator::class);
30-
$definition->replaceArgument(0, $config['type_namespace']);
31-
$definition->replaceArgument(1, $config['generated_type_namespace']);
3224
}
3325
}

Resources/config/container/tdbmgraphql.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
<services>
1010
<defaults autowire="true" autoconfigure="true" public="false" />
1111

12-
<service id="TheCodingMachine\Tdbm\GraphQL\GraphQLTypeAnnotator">
13-
<argument></argument> <!-- will be filled in with tdbm-graphql.type_namespace dynamically -->
14-
<argument></argument> <!-- will be filled in with tdbm-graphql.generated_type_namespace dynamically -->
15-
</service>
12+
<service id="TheCodingMachine\Tdbm\GraphQL\GraphQLTypeAnnotator" />
1613
</services>
1714

1815
</container>

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
],
1919
"require" : {
2020
"php" : ">=7.2",
21-
"thecodingmachine/graphqlite-bundle": "^3",
21+
"thecodingmachine/graphqlite-bundle": "^4",
2222
"thecodingmachine/tdbm-bundle": "^5.1",
23-
"thecodingmachine/tdbm-graphql": "~3.1.0",
23+
"thecodingmachine/tdbm-graphql": "~4.0",
2424
"symfony/framework-bundle": "^4.1.9"
2525
},
2626
"require-dev": {
@@ -40,7 +40,7 @@
4040
},
4141
"extra": {
4242
"branch-alias": {
43-
"dev-master": "3.1.x-dev"
43+
"dev-master": "4.0.x-dev"
4444
}
4545
},
4646
"minimum-stability": "dev",

phpstan.neon

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
parameters:
2-
ignoreErrors:
3-
- "#Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition::children\\(\\)#"
1+
#parameters:
2+
# ignoreErrors:
43
#includes:
54
# - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon

0 commit comments

Comments
 (0)