overblog / graphql-subscription

GraphQL native subscription.
MIT License
14 stars 1 forks source link

Symfony 6 #1

Open vladdnepr opened 1 year ago

vladdnepr commented 1 year ago

Hi. Can you add support of Symfony 6?

`./bin/console cache:clear

Fatal error: Declaration of Overblog\GraphQLSubscription\Bridge\Symfony\OverblogGraphQLSubscriptionBundle::getContainerExtension() must be compatible with Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension(): ?Symfony\Component\DependencyInjection\Extension\ExtensionInterface in /app/vendor/overblog/graphql-subscription/src/Bridge/Symfony/OverblogGraphQLSubscriptionBundle.php on line 13`

After fixing

`./bin/console cache:clear

Fatal error: Declaration of Overblog\GraphQLSubscription\Bridge\Symfony\DependencyInjection\Extension::getAlias() must be compatible with Symfony\Component\DependencyInjection\Extension\Extension::getAlias(): string in /app/vendor/overblog/graphql-subscription/src/Bridge/Symfony/DependencyInjection/Extension.php on line 143`

After fixing

`./bin/console cache:clear

In ArrayNode.php line 322:

Unrecognized option "publisher" under "overblog_graphql_subscription.mercure_hub". Did you mean "publish"?`

mercure_hub next config

$node ->isRequired() ->addDefaultsIfNotSet() ->normalizeKeys(false) ->children() ->scalarNode('handler_id') ->defaultNull() ->info('Mercure handler service id.') ->example('mercure.hub.default.publisher') ->end() ->scalarNode('url') ->info('URL of mercure hub endpoint.') ->example('https://private.example.com/hub') ->end() ->scalarNode('public_url') ->info('Public URL of mercure hub endpoint.') ->example('https://public.example.com/hub') ->end() ->scalarNode('http_client') ->defaultNull() ->info('The ID of the http client service.') ->end() ->arrayNode('publish') ->addDefaultsIfNotSet() ->children() ->scalarNode('provider') ->defaultValue(JwtPublishProvider::class) ->info('The ID of a service to call to generate the publisher JSON Web Token.') ->end() ->scalarNode('secret_key')->info('The JWT secret key to use to publish to this hub.')->end() ->end() ->end() ->arrayNode('subscribe') ->addDefaultsIfNotSet() ->children() ->scalarNode('provider') ->defaultValue(JwtSubscribeProvider::class) ->info('The ID of a service to call to generate the subscriber JSON Web Token.') ->end() ->scalarNode('secret_key')->info('The JWT secret key to use for subscribe.')->end() ->end() ->end() ->end() ->end();

but you add some config

if ($container->hasExtension('mercure')) { $container->prependExtensionConfig( Configuration::NAME, [ 'mercure_hub' => [ 'publisher' => ['handler_id' => 'mercure.hub.default.publisher'], ], ] ); }

But mercure_hub dont contain publisher children

That's why I haven't explored the issues further, can you?

vladdnepr commented 1 year ago

Symfony 6.1.4