Merge branch '3.4' into 4.0

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

View File

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