Skip to content

Commit

Permalink
add async amphp support by base lib
Browse files Browse the repository at this point in the history
  • Loading branch information
bpteam committed Jul 11, 2023
1 parent 806f502 commit 7888c5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DependencyInjection/FlexibleGraphqlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ private function registerTypeRegistryGenerator(array $config, ContainerBuilder $
$container->register($baseTypeRegistryClass)
->setArgument('$config', new Reference(CodeGeneratorConfigInterface::class));

if ($config['operation'] === Configuration::EXECUTOR_TYPE_SYNC) {
if ($config['executor'] === Configuration::EXECUTOR_TYPE_SYNC) {
$container->setAlias(
TypeRegistryGeneratorBuilderInterface::class,
$baseTypeRegistryClass
);
} elseif($config['operation'] === Configuration::EXECUTOR_TYPE_ASYNC_AMPHPV2) {
} elseif($config['executor'] === Configuration::EXECUTOR_TYPE_ASYNC_AMPHPV2) {
$container->register(TypeRegistryGeneratorBuilderInterface::class)
->setClass(TypeRegistryGeneratorBuilderAmphpV2::class)
->setArgument('$baseBuilder', new Reference($baseTypeRegistryClass));
} elseif($config['operation'] === Configuration::EXECUTOR_TYPE_ASYNC_AMPHPV3) {
} elseif($config['executor'] === Configuration::EXECUTOR_TYPE_ASYNC_AMPHPV3) {
$container->register(TypeRegistryGeneratorBuilderInterface::class)
->setClass(TypeRegistryGeneratorBuilderAmphp::class)
->setArgument('$baseBuilder', new Reference($baseTypeRegistryClass));
Expand Down

0 comments on commit 7888c5b

Please sign in to comment.