Skip to content

Commit e43442c

Browse files
committed
Async kernel makes all needed DIC actions
1 parent 246459a commit e43442c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

AsyncKernel.php

+9
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515

1616
namespace Symfony\Component\HttpKernel;
1717

18+
use React\EventLoop\LoopInterface;
1819
use React\Promise\PromiseInterface;
1920
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
2021
use Symfony\Component\DependencyInjection\ContainerBuilder;
22+
use Symfony\Component\DependencyInjection\Definition;
2123
use Symfony\Component\HttpFoundation\Request;
2224
use Symfony\Component\HttpKernel\Exception\AsyncHttpKernelNeededException;
2325

@@ -72,5 +74,12 @@ public function process(ContainerBuilder $container)
7274
$container
7375
->getDefinition('http_kernel')
7476
->setClass(AsyncHttpKernel::class);
77+
78+
$loop = new Definition(LoopInterface::class);
79+
$loop->setSynthetic(true);
80+
81+
$container->setDefinition('reactphp.event_loop', $loop);
82+
$container->setAlias(LoopInterface::class, 'reactphp.event_loop');
83+
7584
}
7685
}

0 commit comments

Comments
 (0)