Skip to content

Commit

Permalink
Renamed "Graphqlite" occurrences to "GraphQLite"
Browse files Browse the repository at this point in the history
  • Loading branch information
devmaslov committed Nov 9, 2021
1 parent cf1a13b commit 639cc51
Show file tree
Hide file tree
Showing 39 changed files with 133 additions and 196 deletions.
2 changes: 1 addition & 1 deletion Command/DumpSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace TheCodingMachine\Graphqlite\Bundle\Command;
namespace TheCodingMachine\GraphQLite\Bundle\Command;

use GraphQL\Type\Definition\TypeWithFields;
use GraphQL\Utils\SchemaPrinter;
Expand Down
2 changes: 1 addition & 1 deletion Context/SymfonyGraphQLContext.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\Context;
namespace TheCodingMachine\GraphQLite\Bundle\Context;


use Symfony\Component\HttpFoundation\Request;
Expand Down
4 changes: 2 additions & 2 deletions Context/SymfonyRequestContextInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace TheCodingMachine\Graphqlite\Bundle\Context;
namespace TheCodingMachine\GraphQLite\Bundle\Context;

use Symfony\Component\HttpFoundation\Request;

Expand All @@ -10,4 +10,4 @@ interface SymfonyRequestContextInterface
* @return Request
*/
public function getRequest(): Request;
}
}
2 changes: 1 addition & 1 deletion Controller/GraphQL/InvalidUserPasswordException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\Controller\GraphQL;
namespace TheCodingMachine\GraphQLite\Bundle\Controller\GraphQL;

use Exception;
use TheCodingMachine\GraphQLite\Exceptions\GraphQLException;
Expand Down
3 changes: 1 addition & 2 deletions Controller/GraphQL/LoginController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace TheCodingMachine\Graphqlite\Bundle\Controller\GraphQL;
namespace TheCodingMachine\GraphQLite\Bundle\Controller\GraphQL;


use Symfony\Component\EventDispatcher\EventDispatcherInterface;
Expand All @@ -13,7 +13,6 @@
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use TheCodingMachine\GraphQLite\Annotations\Mutation;
use TheCodingMachine\GraphQLite\Annotations\Query;

class LoginController
{
Expand Down
12 changes: 1 addition & 11 deletions Controller/GraphQL/MeController.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
<?php
namespace TheCodingMachine\Graphqlite\Bundle\Controller\GraphQL;
namespace TheCodingMachine\GraphQLite\Bundle\Controller\GraphQL;


use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use TheCodingMachine\GraphQLite\Annotations\Mutation;
use TheCodingMachine\GraphQLite\Annotations\Query;
use TheCodingMachine\Graphqlite\Bundle\Types\BasicUser;

class MeController
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\Controller;
namespace TheCodingMachine\GraphQLite\Bundle\Controller;


use Laminas\Diactoros\ResponseFactory;
Expand All @@ -25,12 +25,12 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use TheCodingMachine\Graphqlite\Bundle\Context\SymfonyGraphQLContext;
use TheCodingMachine\GraphQLite\Bundle\Context\SymfonyGraphQLContext;

/**
* Listens to every single request and forward Graphql requests to Graphql Webonix standardServer.
*/
class GraphqliteController
class GraphQLiteController
{
/**
* @var HttpMessageFactoryInterface
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\DependencyInjection;
namespace TheCodingMachine\GraphQLite\Bundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\DependencyInjection;
namespace TheCodingMachine\GraphQLite\Bundle\DependencyInjection;

use GraphQL\Server\ServerConfig;
use GraphQL\Validator\Rules\DisableIntrospection;
Expand All @@ -11,43 +11,31 @@
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
use Symfony\Component\Cache\Psr16Cache;
use TheCodingMachine\GraphQLite\Mappers\StaticClassListTypeMapper;
use TheCodingMachine\GraphQLite\Mappers\StaticClassListTypeMapperFactory;
use Webmozart\Assert\Assert;
use function class_exists;
use Doctrine\Common\Annotations\AnnotationException;
use Doctrine\Common\Annotations\AnnotationReader as DoctrineAnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Cache\ApcuCache;
use function error_log;
use Mouf\Composer\ClassNameMapper;
use Psr\SimpleCache\CacheInterface;
use ReflectionParameter;
use Symfony\Component\Cache\Simple\ApcuCache as SymfonyApcuCache;
use Symfony\Component\Cache\Simple\PhpFilesCache as SymfonyPhpFilesCache;
use function filter_var;
use function function_exists;
use GraphQL\Type\Definition\InputObjectType;
use GraphQL\Type\Definition\ObjectType;
use Psr\Container\ContainerInterface;
use ReflectionClass;
use ReflectionMethod;
use function ini_get;
use function interface_exists;
use function php_sapi_name;
use function str_replace;
use function strpos;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use TheCodingMachine\CacheUtils\ClassBoundCache;
use TheCodingMachine\CacheUtils\ClassBoundCacheContract;
use TheCodingMachine\CacheUtils\ClassBoundCacheContractInterface;
Expand All @@ -56,36 +44,21 @@
use TheCodingMachine\ClassExplorer\Glob\GlobClassExplorer;
use TheCodingMachine\GraphQLite\AggregateControllerQueryProviderFactory;
use TheCodingMachine\GraphQLite\AnnotationReader;
use TheCodingMachine\GraphQLite\Annotations\AbstractRequest;
use TheCodingMachine\GraphQLite\Annotations\Autowire;
use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Mutation;
use TheCodingMachine\GraphQLite\Annotations\Parameter;
use TheCodingMachine\GraphQLite\Annotations\Query;
use TheCodingMachine\Graphqlite\Bundle\Controller\GraphQL\LoginController;
use TheCodingMachine\Graphqlite\Bundle\Controller\GraphQL\MeController;
use TheCodingMachine\GraphQLite\FieldsBuilder;
use TheCodingMachine\GraphQLite\FieldsBuilderFactory;
use TheCodingMachine\GraphQLite\Bundle\Controller\GraphQL\LoginController;
use TheCodingMachine\GraphQLite\Bundle\Controller\GraphQL\MeController;
use TheCodingMachine\GraphQLite\GraphQLRuntimeException as GraphQLException;
use TheCodingMachine\GraphQLite\InputTypeGenerator;
use TheCodingMachine\GraphQLite\InputTypeUtils;
use TheCodingMachine\GraphQLite\Mappers\CompositeTypeMapper;
use TheCodingMachine\GraphQLite\Mappers\GlobTypeMapper;
use TheCodingMachine\GraphQLite\Mappers\RecursiveTypeMapperInterface;
use TheCodingMachine\GraphQLite\Mappers\Root\CompositeRootTypeMapper;
use TheCodingMachine\GraphQLite\Mappers\StaticTypeMapper;
use TheCodingMachine\GraphQLite\NamingStrategy;
use TheCodingMachine\GraphQLite\SchemaFactory;
use TheCodingMachine\GraphQLite\TypeGenerator;
use TheCodingMachine\GraphQLite\Types\MutableObjectType;
use TheCodingMachine\GraphQLite\Types\ResolvableInputObjectType;
use function var_dump;
use TheCodingMachine\Graphqlite\Bundle\Types\SymfonyUserInterfaceType;
use TheCodingMachine\GraphQLite\Bundle\Types\SymfonyUserInterfaceType;

/**
* Detects controllers and types automatically and tag them.
*/
class GraphqliteCompilerPass implements CompilerPassInterface
class GraphQLiteCompilerPass implements CompilerPassInterface
{
/**
* @var AnnotationReader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\DependencyInjection;
namespace TheCodingMachine\GraphQLite\Bundle\DependencyInjection;


use GraphQL\Error\DebugFlag;
Expand All @@ -15,9 +15,14 @@
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;

class GraphqliteExtension extends Extension
class GraphQLiteExtension extends Extension
{

public function getAlias()
{
return 'graphqlite';
}

/**
* Loads a specific configuration.
*
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/OverblogGraphiQLEndpointWiringPass.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace TheCodingMachine\Graphqlite\Bundle\DependencyInjection;
namespace TheCodingMachine\GraphQLite\Bundle\DependencyInjection;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
use TheCodingMachine\Graphqlite\Bundle\GraphiQL\EndpointResolver;
use TheCodingMachine\GraphQLite\Bundle\GraphiQL\EndpointResolver;

final class OverblogGraphiQLEndpointWiringPass implements CompilerPassInterface
{
Expand Down
31 changes: 31 additions & 0 deletions GraphQLiteBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php


namespace TheCodingMachine\GraphQLite\Bundle;

use TheCodingMachine\GraphQLite\Bundle\DependencyInjection\GraphQLiteExtension;
use TheCodingMachine\GraphQLite\Bundle\DependencyInjection\OverblogGraphiQLEndpointWiringPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use TheCodingMachine\GraphQLite\Bundle\DependencyInjection\GraphQLiteCompilerPass;

class GraphQLiteBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
parent::build($container);

$container->addCompilerPass(new GraphQLiteCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION);
$container->addCompilerPass(new OverblogGraphiQLEndpointWiringPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
}

public function getContainerExtension()
{
if (null === $this->extension) {
$this->extension = new GraphQLiteExtension();
}

return $this->extension;
}
}
2 changes: 1 addition & 1 deletion GraphiQL/EndpointResolver.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace TheCodingMachine\Graphqlite\Bundle\GraphiQL;
namespace TheCodingMachine\GraphQLite\Bundle\GraphiQL;

use Overblog\GraphiQLBundle\Config\GraphiQLControllerEndpoint;
use Overblog\GraphiQLBundle\Config\GraphQLEndpoint\GraphQLEndpointInvalidSchemaException;
Expand Down
21 changes: 0 additions & 21 deletions GraphqliteBundle.php

This file was deleted.

4 changes: 2 additions & 2 deletions Mappers/RequestParameter.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\Mappers;
namespace TheCodingMachine\GraphQLite\Bundle\Mappers;


use GraphQL\Type\Definition\ResolveInfo;
use TheCodingMachine\Graphqlite\Bundle\Context\SymfonyRequestContextInterface;
use TheCodingMachine\GraphQLite\Bundle\Context\SymfonyRequestContextInterface;
use TheCodingMachine\GraphQLite\GraphQLRuntimeException as GraphQLException;
use TheCodingMachine\GraphQLite\Parameters\ParameterInterface;

Expand Down
2 changes: 1 addition & 1 deletion Mappers/RequestParameterMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace TheCodingMachine\Graphqlite\Bundle\Mappers;
namespace TheCodingMachine\GraphQLite\Bundle\Mappers;


use phpDocumentor\Reflection\DocBlock;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/graphqlite-bundle/badge.svg?branch=master&service=github)](https://coveralls.io/github/thecodingmachine/graphqlite-bundle?branch=master)


# Graphqlite bundle
# GraphQLite bundle

Symfony 4 bundle for the thecodingmachine/graphqlite package.

Expand Down
Loading

0 comments on commit 639cc51

Please sign in to comment.