Skip to content

Commit

Permalink
[DI] Add support for "wither" methods - for greater immutable services
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 3, 2019
1 parent 65a81fc commit e46b600
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Console/Descriptor/XmlDescriptor.php
Expand Up @@ -348,6 +348,9 @@ private function getContainerDefinitionDocument(Definition $definition, string $
foreach ($calls as $callData) {
$callsXML->appendChild($callXML = $dom->createElement('call'));
$callXML->setAttribute('method', $callData[0]);
if ($callData[2] ?? false) {
$callXML->setAttribute('returns-clone', 'true');
}
}
}

Expand Down

0 comments on commit e46b600

Please sign in to comment.