Cook the garlic in oil until just pale golden. Crumble in the sausage. Stir and cook on medium heat until well browned, 10 minutes.
Add mushrooms, stir and season with a small pinch of salt. Turn up the heat, pour the wine and let the alcohol evaporate. Bring back on medium heat and cook until the mushrooms are soft, about 10 minutes longer.
Remove from heat and bring to room temperature. Discard the garlic. Transfer to a bowl and add cream, grated cheese, egg, rosemary and pepper. Adjust seasoning and stir well.
Preheat the oven to 200 C / Gas 6.
Unroll the puff pastry sheet and cut out 12 equal squares. Also cut out 12 parchment paper squares of the same size.
Line a 12-cup muffin tin with parchment paper and then with the pastry squares. Add 1 to 2 tablespoons of the sausage and mushroom mixture in each cup and slightly fold the edges of the pastry towards the centre.
Bake in the preheated oven until golden, about 20 minutes. Remove from the oven and let stand for a few minutes. Serve lukewarm.