File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/Codeception/Lib/Connector Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,16 @@ public function __construct(
3131 parent ::__construct ($ kernel );
3232 $ this ->followRedirects ();
3333 $ this ->container = $ this ->getContainer ();
34- $ this ->rebootKernel ();
34+ $ this ->rebootKernel (); // Ensure the profiler exists
3535 }
3636
3737 /** @param Request $request */
3838 protected function doRequest (object $ request ): Response
3939 {
40- if ($ this ->rebootable ) {
41- if ($ this ->hasPerformedRequest ) {
42- $ this ->rebootKernel ();
43- } else {
44- $ this ->hasPerformedRequest = true ;
45- }
40+ if ($ this ->hasPerformedRequest && $ this ->rebootable ) {
41+ $ this ->rebootKernel ();
42+ } else {
43+ $ this ->hasPerformedRequest = true ;
4644 }
4745
4846 return parent ::doRequest ($ request );
@@ -66,7 +64,9 @@ public function rebootKernel(): void
6664 }
6765
6866 $ this ->persistDoctrineConnections ();
69- $ this ->kernel ->reboot (null );
67+ $ this ->kernel ->boot ();
68+ $ this ->kernel ->shutdown ();
69+ $ this ->kernel ->boot ();
7070 $ this ->container = $ this ->getContainer ();
7171
7272 foreach ($ this ->persistentServices as $ serviceName => $ service ) {
You can’t perform that action at this time.
0 commit comments