File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 15
15
16
16
namespace Symfony \Component \HttpKernel ;
17
17
18
+ use React \EventLoop \LoopInterface ;
18
19
use React \Promise \PromiseInterface ;
19
20
use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
20
21
use Symfony \Component \DependencyInjection \ContainerBuilder ;
22
+ use Symfony \Component \DependencyInjection \Definition ;
21
23
use Symfony \Component \HttpFoundation \Request ;
22
24
use Symfony \Component \HttpKernel \Exception \AsyncHttpKernelNeededException ;
23
25
@@ -72,5 +74,12 @@ public function process(ContainerBuilder $container)
72
74
$ container
73
75
->getDefinition ('http_kernel ' )
74
76
->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
+
75
84
}
76
85
}
You can’t perform that action at this time.
0 commit comments