Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenk committed Mar 20, 2023
1 parent 66012b0 commit b8b6085
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: test
strategy:
matrix:
install-args: ['', '--prefer-lowest']
install-args: ['']
php-version: ['8.1']
fail-fast: false
steps:
Expand Down
9 changes: 5 additions & 4 deletions DependencyInjection/GraphQLiteCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use TheCodingMachine\GraphQLite\Mappers\StaticClassListTypeMapperFactory;
use Webmozart\Assert\Assert;
use function assert;
use function class_exists;
use Doctrine\Common\Annotations\AnnotationReader as DoctrineAnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
Expand Down Expand Up @@ -75,18 +76,18 @@ public function process(ContainerBuilder $container): void
{
$reader = $this->getAnnotationReader();
$cacheDir = $container->getParameter('kernel.cache_dir');
Assert::string($cacheDir);
assert(is_string($cacheDir));
$this->cacheDir = $cacheDir;
//$inputTypeUtils = new InputTypeUtils($reader, $namingStrategy);

// Let's scan the whole container and tag the services that belong to the namespace we want to inspect.
$controllersNamespaces = $container->getParameter('graphqlite.namespace.controllers');
Assert::isIterable($controllersNamespaces);
$typesNamespaces = $container->getParameter('graphqlite.namespace.types');
Assert::isIterable($typesNamespaces);
assert(is_iterable($controllersNamespaces));
assert(is_iterable($typesNamespaces));

$firewallName = $container->getParameter('graphqlite.security.firewall_name');
Assert::string($firewallName);
assert(is_string($firewallName));
$firewallConfigServiceName = 'security.firewall.map.config.'.$firewallName;

// 2 seconds of TTL in environment mode. Otherwise, let's cache forever!
Expand Down
4 changes: 2 additions & 2 deletions GraphiQL/EndpointResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Overblog\GraphiQLBundle\Config\GraphiQLControllerEndpoint;
use Overblog\GraphiQLBundle\Config\GraphQLEndpoint\GraphQLEndpointInvalidSchemaException;
use Symfony\Component\HttpFoundation\RequestStack;
use Webmozart\Assert\Assert;
use function assert;

final class EndpointResolver implements GraphiQLControllerEndpoint
{
Expand All @@ -23,7 +23,7 @@ public function getBySchema($name)
{
if ('default' === $name) {
$request = $this->requestStack->getCurrentRequest();
Assert::notNull($request);
assert(!is_null($request));

return $request->getBaseUrl().'/graphql';
}
Expand Down

0 comments on commit b8b6085

Please sign in to comment.