Details
Description
It is because of the line https://github.com/doctrine/doctrine2/commit/a99ffc126f3ec3fa45fa806bfdba4fc31f1afaa4#L0R1460 where non-strict comparison is done for collection objects.
I would suggest traversing the elements of the both collections and comparing them using the strict "===" operator.
The https://github.com/doctrine/doctrine2/commit/954b5077e495aa9fa4eb54ef4cb8ac309e9415ae by guilhermeblanco fixes the issue.