Warm the olive oil in a deep pan over a medium heat and add the onions. Cook gently for 10 minutes until beginning to soften. Add the garlic along with the thyme leaves, chopped rosemary leaves, bay leaves and chilli flakes. Stir well until the onions are pale gold in colour.