How to sort Doctrine results with findAll()

Using findAll() it’s impossible to pass another orderby/sort parameter, because findAll definition looks like this:

Instead you can you findBy() which is more complex:

Look at the $orderBy parameter.

 

So now, when selecting all the records from a repository instead of:

just use: