|
@@ 120-128 (lines=9) @@
|
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
// Clear all entity managers to clear references to entities for GC |
| 120 |
|
if ($this->container->hasParameter('doctrine.entity_managers')) { |
| 121 |
|
foreach ($this->container->getParameter('doctrine.entity_managers') as $id) { |
| 122 |
|
if ($this->container->getParameter('doctrine.orm.entity_managers.' . $id . '.clear_on_shutdown') === true) { |
| 123 |
|
if (!$this->container instanceof IntrospectableContainerInterface || $this->container->initialized($id)) { |
| 124 |
|
$this->container->get($id)->clear(); |
| 125 |
|
} |
| 126 |
|
} |
| 127 |
|
} |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
// Close all connections to avoid reaching too many connections in the process when booting again later (tests) |
| 131 |
|
if ($this->container->hasParameter('doctrine.connections')) { |
|
@@ 131-139 (lines=9) @@
|
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
// Close all connections to avoid reaching too many connections in the process when booting again later (tests) |
| 131 |
|
if ($this->container->hasParameter('doctrine.connections')) { |
| 132 |
|
foreach ($this->container->getParameter('doctrine.connections') as $id) { |
| 133 |
|
if ($this->container->getParameter('doctrine.dbal.connections.' . $id . '.close_on_shutdown') === true) { |
| 134 |
|
if (!$this->container instanceof IntrospectableContainerInterface || $this->container->initialized($id)) { |
| 135 |
|
$this->container->get($id)->close(); |
| 136 |
|
} |
| 137 |
|
} |
| 138 |
|
} |
| 139 |
|
} |
| 140 |
|
} |
| 141 |
|
|
| 142 |
|
/** |