Step 1 - Preheat oven to 400°F and line a baking sheet with parchment paper. Set aside.
Step 2 - Roll out each half puff pastry square (if purchased in 1 package with a perforated halves) to about ¼” thick, in as square of a shape as possible. Slice into 4 lengths and each lengths into 3 squares. Lay squares on baking sheet and refrigerate dough.
Step 3 - Add remaining olive oil to saute pan over medium heat and saute garlic cloves for 1-2 minutes, then add in mushrooms, thyme and salt. Saute for 3-4 minutes, add in white wine to deglaze pan. Cook a further 2 minutes then remove from heat. Stir in onion confit and check for seasonings.
Step 4 - Remove dough from fridge and brush with remaining olive oil. Spoon about 1-2 tsp ricotta cheese in the centre of each square, top with mushroom mixture and a sprinkle of gruyere. Bake for 20 minutes, keeping oven door closed, until pastry is puffed and golden brown. Serve warm.