Commit 991e1433 authored by catch's avatar catch
Browse files

Issue #2603152 by alexpott, Fabianx, neclimdul: Fix PHP 7 testbot failures

parent b3150847
...@@ -821,6 +821,13 @@ protected function initializeContainer() { ...@@ -821,6 +821,13 @@ protected function initializeContainer() {
// If there is no container and no cached container definition, build a new // If there is no container and no cached container definition, build a new
// one from scratch. // one from scratch.
if (!isset($container) && !isset($container_definition)) { if (!isset($container) && !isset($container_definition)) {
if (version_compare(phpversion(), '7.0.0-dev') >= 0) {
// The service graph implementation is prone to corruption during GC.
// Collect cycles now then disable the GC for the time of the compiler
// run.
// @see https://bugs.php.net/bug.php?id=70805
gc_collect_cycles();
}
$container = $this->compileContainer(); $container = $this->compileContainer();
// Only dump the container if dumping is allowed. This is useful for // Only dump the container if dumping is allowed. This is useful for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment