bug #35243 [HttpKernel] release lock explicitly (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] release lock explicitly

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35242
| License       | MIT
| Doc PR        | -

Commits
-------

6fb55812ab [HttpKernel] release lock explicitly
This commit is contained in:
Fabien Potencier 2020-01-07 20:30:23 +01:00
commit 290ce00f96

View File

@ -556,7 +556,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
} }
} }
public function __destruct() public function release()
{ {
flock($this->lock, LOCK_UN); flock($this->lock, LOCK_UN);
fclose($this->lock); fclose($this->lock);
@ -634,7 +634,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
} }
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
unset($cache); $cache->release();
$this->container = require $cachePath; $this->container = require $cachePath;
$this->container->set('kernel', $this); $this->container->set('kernel', $this);