Preheat the oven to 400 F / 200 C.
If necessary, gently roll out your puff pastry on a lightly floured surface until you reach the dimensions mentioned in the ingredients.
Use a 3-inch (8 cpastry cutter, tin can, biscuit cutter or anything that can cut cleanly through puff pastry to cut 12 circles. Try not to twist your cutter, just press it into the pastry and lift it up.
Transfer the circles to a parchment-lined baking sheet and bake until they puff up and are golden – about 15 minutes. Remove and let cool.
Meanwhile, prepare the filling. Heat the oil in a medium pan over medium heat. Add the onion and sauté until soft. Then add the garlic and sauté until soft. Transfer to a bowl and add the chopped mushrooms to the pan. Fry until browned then remove to the bowl with the onions. Allow to cool.
When the puffs are cool, use a sharp knife to gently cut lids off the puffs. Handle them very gently as they are delicate and it’s easy to stick your thumb through them. If any are not hollow inside, use your fingers to gently pull out some of the pastry from inside.
When the mushrooms are cool, add the remaining ingredients and mix well. Spoon the filling into each pastry cup and serve. If you want you can put the lids back on (I didn’t) and garnish with a few leaves of basil.