Skip to content

Commit 9f9f4d3

Browse files
Merge branch '7.2' into 7.3
* 7.2: [Validator] Remove comment to GitHub issue [Serializer] Add support for discriminator map in property normalizer [DependencyInjection] Fix inlining when public services are involved fix contracts directory name Fix TraceableSerializer when collected caller from array map [HttpClient] Limit curl's connection cache size [FrameworkBundle] Fix argument not provided to `add_bus_name_stamp_middleware`
2 parents 041d650 + 98c4586 commit 9f9f4d3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Compiler/InlineServiceDefinitionsPass.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public function process(ContainerBuilder $container): void
6969
if (!$this->graph->hasNode($id)) {
7070
continue;
7171
}
72+
if ($definition->isPublic()) {
73+
$this->connectedIds[$id] = true;
74+
}
7275
foreach ($this->graph->getNode($id)->getOutEdges() as $edge) {
7376
if (isset($notInlinedIds[$edge->getSourceNode()->getId()])) {
7477
$this->currentId = $id;
@@ -188,17 +191,13 @@ private function isInlineableDefinition(string $id, Definition $definition): boo
188191
return true;
189192
}
190193

191-
if ($definition->isPublic()) {
194+
if ($definition->isPublic()
195+
|| $this->currentId === $id
196+
|| !$this->graph->hasNode($id)
197+
) {
192198
return false;
193199
}
194200

195-
if (!$this->graph->hasNode($id)) {
196-
return true;
197-
}
198-
199-
if ($this->currentId === $id) {
200-
return false;
201-
}
202201
$this->connectedIds[$id] = true;
203202

204203
$srcIds = [];

0 commit comments

Comments
 (0)