Skip to content

Commit

Permalink
update namespace to Zestic
Browse files Browse the repository at this point in the history
  • Loading branch information
iampersistent committed Nov 14, 2021
1 parent bd919f4 commit d76a335
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ the server config.
You'll need to set up the route. In `config/routes.php`
```php
return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container) : void {
$app->post('/graphql', \Xaddax\GraphQL\Middleware\GraphQLMiddleware::class, 'graphql');
$app->post('/graphql', \Zestic\GraphQL\Middleware\GraphQLMiddleware::class, 'graphql');
};
```
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"minimum-stability": "dev",
"autoload": {
"psr-4": {
"IamPersistent\\GraphQL\\Middleware\\": "src/"
"Zestic\\GraphQL\\Middleware\\": "src/"
}
},
"autoload-dev": {
Expand Down
10 changes: 5 additions & 5 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace IamPersistent\GraphQL\Middleware;
namespace Zestic\GraphQL\Middleware;

final class ConfigProvider
{
Expand All @@ -17,11 +17,11 @@ public function getDependencies(): array
return [
'factories' => [
\GraphQL\Type\Schema::class =>
\IamPersistent\GraphQL\Middleware\Factory\SchemaFactory::class,
\Zestic\GraphQL\Middleware\Factory\SchemaFactory::class,
\GraphQL\Server\ServerConfig::class =>
\IamPersistent\GraphQL\Middleware\Factory\ServerConfigFactory::class,
\IamPersistent\GraphQL\Middleware\GraphQLMiddleware::class =>
\IamPersistent\GraphQL\Middleware\Factory\GraphQLMiddlewareFactory::class,
\Zestic\GraphQL\Middleware\Factory\ServerConfigFactory::class,
\Zestic\GraphQL\Middleware\GraphQLMiddleware::class =>
\Zestic\GraphQL\Middleware\Factory\GraphQLMiddlewareFactory::class,
],
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/GraphQLMiddlewareFactory.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
declare(strict_types=1);

namespace IamPersistent\GraphQL\Middleware\Factory;
namespace Zestic\GraphQL\Middleware\Factory;

use App\Jwt\JwtConfiguration;
use GraphQL\Server\ServerConfig;
use Psr\Container\ContainerInterface;
use IamPersistent\GraphQL\Middleware\GraphQLMiddleware;
use Zestic\GraphQL\Middleware\GraphQLMiddleware;

final class GraphQLMiddlewareFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/SchemaFactory.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace IamPersistent\GraphQL\Middleware\Factory;
namespace Zestic\GraphQL\Middleware\Factory;

use GraphQL\Type\Schema;
use Psr\Container\ContainerInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/ServerConfigFactory.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace IamPersistent\GraphQL\Middleware\Factory;
namespace Zestic\GraphQL\Middleware\Factory;

use GraphQL\Server\ServerConfig;
use GraphQL\Type\Schema;
Expand Down
6 changes: 3 additions & 3 deletions src/GraphQLMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php
declare(strict_types=1);

namespace IamPersistent\GraphQL\Middleware;
namespace Zestic\GraphQL\Middleware;

use App\Jwt\JwtConfiguration;
use Firebase\JWT\JWT;
use GraphQL\Server\ServerConfig;
use GraphQL\Server\StandardServer;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Laminas\Diactoros\Response\JsonResponse;

final class GraphQLMiddleware implements MiddlewareInterface
{
Expand Down Expand Up @@ -109,7 +109,7 @@ private function fetchToken(ServerRequestInterface $request): ?string
}
return $cookieParams[$this->options["cookie"]];
};

return null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/RequestContextInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace IamPersistent\GraphQL\Middleware;
namespace Zestic\GraphQL\Middleware;

use GraphQL\Language\AST\DocumentNode;
use GraphQL\Server\OperationParams;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Factory/GraphQLMiddlewareFactoryCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
namespace Tests\Unit\Factory;

use GraphQL\Server\StandardServer;
use IamPersistent\GraphQL\Middleware\Factory\GraphQLMiddlewareFactory;
use IamPersistent\GraphQL\Middleware\GraphQLMiddleware;
use Prophecy\Prophet;
use Psr\Container\ContainerInterface;
use UnitTester;
use Zestic\GraphQL\Middleware\Factory\GraphQLMiddlewareFactory;
use Zestic\GraphQL\Middleware\GraphQLMiddleware;

class GraphQLMiddlewareFactoryCest
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Factory/StandardServerFactoryCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
use GraphQL\Server\ServerConfig;
use GraphQL\Server\StandardServer;
use GraphQL\Type\Schema;
use IamPersistent\GraphQL\Factory\Middleware\StandardServerFactory;
use Tests\Fixture\TestContainer;
use Tests\Fixture\TestResolver;
use Tests\Fixture\TestSchema;
use UnitTester;
use Zestic\GraphQL\Factory\Middleware\StandardServerFactory;

class StandardServerFactoryCest
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Middleware/GraphQLMiddlewareCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

use GraphQL\Server\ServerConfig;
use GraphQL\Server\StandardServer;
use IamPersistent\GraphQL\Middleware\GraphQLMiddleware;
use Laminas\Diactoros\ServerRequest;
use Prophecy\Prophet;
use Psr\Http\Message\ResponseInterface;
use Tests\Fixture\Http\TestRequestHandler;
use UnitTester;
use Zestic\GraphQL\Middleware\GraphQLMiddleware;

class GraphQLMiddlewareCest
{
Expand Down

0 comments on commit d76a335

Please sign in to comment.