Skip to content

Commit

Permalink
symfony/fix_profiler_loading set persistent services before loading p…
Browse files Browse the repository at this point in the history
…rofiler (this prevents services being instantiated during profiler instantiating getting wrong dependencies (they're going to be replaced during setting _persistent_services_) (#4437)
  • Loading branch information
ihorsamusenko authored and DavertMik committed Aug 10, 2017
1 parent 6d48347 commit dcc26ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Codeception/Lib/Connector/Symfony.php
Expand Up @@ -75,12 +75,12 @@ public function rebootKernel()
$this->kernel->boot();
$this->container = $this->kernel->getContainer();

if ($this->container->has('profiler')) {
$this->container->get('profiler')->enable();
}

foreach ($this->persistentServices as $serviceName => $service) {
$this->container->set($serviceName, $service);
}

if ($this->container->has('profiler')) {
$this->container->get('profiler')->enable();
}
}
}

0 comments on commit dcc26ac

Please sign in to comment.