Merge branch '4.1'

* 4.1:
  [HttpKernel] Dont reset start time when not needed
This commit is contained in:
Nicolas Grekas 2018-05-25 17:07:57 +02:00
commit b1a41a4812

View File

@ -94,20 +94,22 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
*/ */
public function boot() public function boot()
{ {
if ($this->debug) {
$this->startTime = microtime(true);
}
if (true === $this->booted) { if (true === $this->booted) {
if (!$this->requestStackSize && $this->resetServices) { if (!$this->requestStackSize && $this->resetServices) {
if ($this->container->has('services_resetter')) { if ($this->container->has('services_resetter')) {
$this->container->get('services_resetter')->reset(); $this->container->get('services_resetter')->reset();
} }
$this->resetServices = false; $this->resetServices = false;
if ($this->debug) {
$this->startTime = microtime(true);
}
} }
return; return;
} }
if ($this->debug) {
$this->startTime = microtime(true);
}
if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) { if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) {
putenv('SHELL_VERBOSITY=3'); putenv('SHELL_VERBOSITY=3');
$_ENV['SHELL_VERBOSITY'] = 3; $_ENV['SHELL_VERBOSITY'] = 3;