Preheat the oven to 180°C/355°F. Grease and line the tray with baking paper.
Heat the oil in a medium frying pan over medium-high heat. Combine finely chopped onions and smashed garlic. Cook for approximately 3-4 minutes, stirring constantly, until the onion is tender and transparent.
Cook for 5 minutes, stirring regularly, until no extra liquid remains in the pan. Transfer the mixture to a bowl and allow it to cool for 10-15 minutes.
Add the ricotta to the chilled spinach mixture.Using a wooden spoon or fork, whisk together all of the ingredients until thoroughly blended. Season with salt and pepper as necessary.
Roll out the puff pastry sheets flat and equallydistribute the ricotta spinach mixture.
Roll up the puff pastry sheets and set them on a baking pan. To set, refrigerate for 10minutes.
Remove from the fridge, then cut each roll into two or three smaller rolls and place back on the baking pan.
Whisk the egg and brush it on each roll.
Bake at 350 degrees for 30 minutes, or until the puff pastry is golden brown and flaky.