Skip to content

Commit bd87931

Browse files
authored
Merge pull request #11 from mistraloz/support-graphqlite-v5
Support for GraphQLite v5
2 parents 9da9ca8 + b37db8e commit bd87931

8 files changed

+38
-35
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
<?php
22

33

4-
namespace TheCodingMachine\Tdbm\Graphql\Bundle\DependencyInjection;
4+
namespace TheCodingMachine\Tdbm\GraphQL\Bundle\DependencyInjection;
55

66

77
use Symfony\Component\Config\FileLocator;
88
use Symfony\Component\DependencyInjection\ContainerBuilder;
99
use Symfony\Component\DependencyInjection\Extension\Extension;
1010
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
1111

12-
class TheCodingMachineTdbmGraphqlExtension extends Extension
12+
class TheCodingMachineTdbmGraphQLExtension extends Extension
1313
{
1414

1515
/**
1616
* Loads a specific configuration.
1717
*
18+
* @param array<mixed, mixed> $configs
19+
*
1820
* @throws \InvalidArgumentException When provided tag is not defined in this extension
1921
*/
20-
public function load(array $configs, ContainerBuilder $container)
22+
public function load(array $configs, ContainerBuilder $container) : void
2123
{
22-
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/container'));
24+
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/container'));
2325
$loader->load('tdbmgraphql.xml');
2426
}
2527
}

Tests/Fixtures/ExposeConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33

4-
namespace TheCodingMachine\Tdbm\Graphql\Bundle\Tests\Fixtures;
4+
namespace TheCodingMachine\Tdbm\GraphQL\Bundle\Tests\Fixtures;
55

66

77
use TheCodingMachine\TDBM\Configuration;

Tests/Fixtures/config/services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313

1414
# makes classes in src/ available to be used as services
1515
# this creates a service per class whose id is the fully-qualified class name
16-
TheCodingMachine\Tdbm\Graphql\Bundle\Tests\Fixtures\:
16+
TheCodingMachine\Tdbm\GraphQL\Bundle\Tests\Fixtures\:
1717
resource: '../*'
1818
exclude: '../{Entities}'
1919
public: true

Tests/FunctionalTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22

3-
namespace TheCodingMachine\Tdbm\Graphql\Bundle\Tests;
3+
namespace TheCodingMachine\Tdbm\GraphQL\Bundle\Tests;
44

5+
use Laminas\Code\Generator\FileGenerator;
56
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6-
use TheCodingMachine\Tdbm\Graphql\Bundle\Tests\Fixtures\ExposeConfiguration;
7+
use TheCodingMachine\Tdbm\GraphQL\Bundle\Tests\Fixtures\ExposeConfiguration;
78
use TheCodingMachine\TDBM\Utils\BeanDescriptor;
8-
use Zend\Code\Generator\FileGenerator;
99
use TheCodingMachine\GraphQLite\Annotations\Field;
1010

1111
class FunctionalTest extends KernelTestCase
1212
{
1313
protected static function createKernel(array $options = [])
1414
{
15-
return new TdbmGraphqlTestingKernel('test', true);
15+
return new TdbmGraphQLTestingKernel('test', true);
1616
}
1717

1818
public function testServiceWiring()

Tests/TdbmGraphqlTestingKernel.php renamed to Tests/TdbmGraphQLTestingKernel.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<?php
22

33

4-
namespace TheCodingMachine\Tdbm\Graphql\Bundle\Tests;
4+
namespace TheCodingMachine\Tdbm\GraphQL\Bundle\Tests;
55

66

77
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
8+
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
89
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
910
use Symfony\Component\Config\Loader\LoaderInterface;
1011
use Symfony\Component\DependencyInjection\ContainerBuilder;
1112
use Symfony\Component\HttpKernel\Kernel;
1213
use Symfony\Component\Routing\RouteCollectionBuilder;
13-
use TheCodingMachine\Graphqlite\Bundle\GraphqliteBundle;
14+
use TheCodingMachine\GraphQLite\Bundle\GraphQLiteBundle;
1415
use TheCodingMachine\TDBM\Bundle\TdbmBundle;
15-
use TheCodingMachine\Tdbm\Graphql\Bundle\TheCodingMachineTdbmGraphqlBundle;
16+
use TheCodingMachine\Tdbm\GraphQL\Bundle\TheCodingMachineTdbmGraphQLBundle;
1617

17-
class TdbmGraphqlTestingKernel extends Kernel
18+
class TdbmGraphQLTestingKernel extends Kernel
1819
{
1920
use MicroKernelTrait;
2021

@@ -28,11 +29,11 @@ public function __construct()
2829
public function registerBundles()
2930
{
3031
return [
31-
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
32+
new FrameworkBundle(),
3233
new DoctrineBundle(),
3334
new TdbmBundle(),
34-
new GraphqliteBundle(),
35-
new TheCodingMachineTdbmGraphqlBundle(),
35+
new GraphQLiteBundle(),
36+
new TheCodingMachineTdbmGraphQLBundle(),
3637
];
3738
}
3839

@@ -57,8 +58,8 @@ public function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
5758

5859
$container->loadFromExtension('graphqlite', array(
5960
'namespace' => [
60-
'controllers' => ['TheCodingMachine\\Graphqlite\\Bundle\\Tests\\Fixtures\\Controller\\'],
61-
'types' => ['TheCodingMachine\\Graphqlite\\Bundle\\Tests\\Fixtures\\Types\\', 'TheCodingMachine\\Graphqlite\\Bundle\\Tests\\Fixtures\\Entities\\']
61+
'controllers' => ['TheCodingMachine\\GraphQLite\\Bundle\\Tests\\Fixtures\\Controller\\'],
62+
'types' => ['TheCodingMachine\\GraphQLite\\Bundle\\Tests\\Fixtures\\Types\\', 'TheCodingMachine\\GraphQLite\\Bundle\\Tests\\Fixtures\\Entities\\']
6263
]
6364
));
6465
});

TheCodingMachineTdbmGraphQLBundle.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
4+
namespace TheCodingMachine\Tdbm\GraphQL\Bundle;
5+
6+
use Symfony\Component\HttpKernel\Bundle\Bundle;
7+
8+
class TheCodingMachineTdbmGraphQLBundle extends Bundle
9+
{
10+
}

TheCodingMachineTdbmGraphqlBundle.php

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

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@
1818
],
1919
"require" : {
2020
"php" : ">=7.2",
21-
"thecodingmachine/graphqlite-bundle": "^4",
21+
"thecodingmachine/graphqlite-bundle": "^5",
2222
"thecodingmachine/tdbm-bundle": "^5.2",
23-
"thecodingmachine/tdbm-graphql": "~4.0",
23+
"thecodingmachine/tdbm-graphql": "^5.0",
2424
"symfony/framework-bundle": "^4.1.9 | ^5"
2525
},
2626
"require-dev": {
2727
"symfony/security-bundle": "^4.1.9 | ^5",
2828
"symfony/yaml": "^4.1.9 | ^5",
2929
"phpunit/phpunit": "^8.0.4",
30-
"phpstan/phpstan-shim": "^0.11.4",
30+
"phpstan/phpstan": "^1",
3131
"php-coveralls/php-coveralls": "^2.1"
3232
},
3333
"scripts": {
34-
"phpstan": "phpstan analyse TheCodingMachineTdbmGraphqlBundle.php DependencyInjection/ Resources/ -c phpstan.neon --level=7 --no-progress"
34+
"phpstan": "phpstan analyse TheCodingMachineTdbmGraphQLBundle.php DependencyInjection/ Resources/ -c phpstan.neon --level=7 --no-progress"
3535
},
3636
"autoload" : {
3737
"psr-4" : {
38-
"TheCodingMachine\\Tdbm\\Graphql\\Bundle\\" : ""
38+
"TheCodingMachine\\Tdbm\\GraphQL\\Bundle\\" : ""
3939
}
4040
},
4141
"extra": {
4242
"branch-alias": {
43-
"dev-master": "4.1.x-dev"
43+
"dev-master": "5.0.x-dev"
4444
}
4545
},
4646
"minimum-stability": "dev",

0 commit comments

Comments
 (0)