I have 2 entities, Invoice and Advance. Each have a "paidAt" property.
In a controller, I fetch both Invoice and Advance within a date range. Then, I merge them into 1 single array and push it into my view, where I display them in a list.
Before pushing them to my view, I would like to sort them using the "paidAt" property. I found some multi-dimensional sorts functions on PHP doc, but all make use of php native function array_multisort()
So Symfony throws me an error : Cannot use object of type Entity\Invoice as array
Is there anyway to do what I'm looking for ?