src/CSDT/CollectionsBundle/CollectionHelper/HelperTrait/HelperMergeTrait.php
public function mergeCollections(
        CollectionInterface $collection1, 
        CollectionInterface $collection2
    ) {
        return $this->mergeArray($collection1, $collection2->toArray());
    }
public function mergeCollections(
        CollectionInterface $collection1, 
        CollectionInterface $collection2
    ) {
        return $this->mergeArray($collection1, $collection2->toArray());
    }
Merge collection

Return a collection of the same type as
$collection1 with all the content of the
second collection. Note a data lost is
possible by example if you merge a
ValueCollection as $collection1 and a
MapCollection as $collection2.

@param CollectionInterface $collection1 The first collection
@param CollectionInterface $collection2 The second collection

@throws \ParseError if the caster manager is not able to parse the
array to the first collection
@return CollectionInterface