File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ public function __construct(
3232 protected function execute (InputInterface $ input , OutputInterface $ output ): int
3333 {
3434 $ transport = new StdioTransport (logger: $ this ->logger );
35- $ this ->server ->connect ($ transport );
36-
37- $ transport ->listen ();
35+ $ this ->server ->run ($ transport );
3836
3937 return Command::SUCCESS ;
4038 }
Original file line number Diff line number Diff line change 2626{
2727 public function __construct (
2828 private Server $ server ,
29- private HttpMessageFactoryInterface $ psrHttpFactory ,
29+ private HttpMessageFactoryInterface $ httpMessageFactory ,
3030 private HttpFoundationFactoryInterface $ httpFoundationFactory ,
3131 private ResponseFactoryInterface $ responseFactory ,
3232 private StreamFactoryInterface $ streamFactory ,
@@ -36,18 +36,15 @@ public function __construct(
3636
3737 public function handle (Request $ request ): Response
3838 {
39- $ psrRequest = $ this ->psrHttpFactory ->createRequest ($ request );
40-
4139 $ transport = new StreamableHttpTransport (
42- $ psrRequest ,
40+ $ this -> httpMessageFactory -> createRequest ( $ request ) ,
4341 $ this ->responseFactory ,
4442 $ this ->streamFactory ,
4543 $ this ->logger ?? new NullLogger (),
4644 );
4745
48- $ this ->server ->connect ($ transport );
49- $ psrResponse = $ transport ->listen ();
50-
51- return $ this ->httpFoundationFactory ->createResponse ($ psrResponse );
46+ return $ this ->httpFoundationFactory ->createResponse (
47+ $ this ->server ->run ($ transport ),
48+ );
5249 }
5350}
You can’t perform that action at this time.
0 commit comments