Skip to content

Commit 6c76828

Browse files
ihorsamusenkoDavertMik
authored andcommitted
symfony/fix_profiler_loading set persistent services before loading profiler (this prevents services being instantiated during profiler instantiating getting wrong dependencies (they're going to be replaced during setting _persistent_services_) (#4437)
1 parent 6573b04 commit 6c76828

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Codeception/Lib/Connector/Symfony.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function rebootKernel()
7575
$this->kernel->boot();
7676
$this->container = $this->kernel->getContainer();
7777

78-
if ($this->container->has('profiler')) {
79-
$this->container->get('profiler')->enable();
80-
}
81-
8278
foreach ($this->persistentServices as $serviceName => $service) {
8379
$this->container->set($serviceName, $service);
8480
}
81+
82+
if ($this->container->has('profiler')) {
83+
$this->container->get('profiler')->enable();
84+
}
8585
}
8686
}

0 commit comments

Comments
 (0)