Preheat the oven to 220°C / 425°F / Gas mark 7.
Line a baking tray with greaseproof paper and set aside.
Use a large frying pan and heat half the oil and sizzle the mushrooms for 3-4 minutes on each side until golden and cooked through.
Use a drop more oil if needed.
Drain on kitchen paper.
Place the pan back on the heat with the rest of the oil.
Fry the garlic for a minute then add the spinach to the pan and cook for 2-3 minutes over a high heat until completely wilted.
Season with salt and pepper, then tip the spinach into a sieve to drain thoroughly.
On a lightly floured surface, scatter the thyme leaves and roll the pastry out to 2.5cm.
Using a saucer, cut out 4 circles about 5cm wider than the mushrooms (for the bottoms) and 4 circles about 10cm wider (for the tops), re-rolling the trimmings as needed.
Place the 4 smaller circles on the baking tray and top each with a quarter of the spinach, making sure the pile of spinach doesn’t go wider than the mushrooms.
Top the spinach with a slice of cheese, then a mushroom, and top the mushroom with another slice of cheese.
Brush the border of each pastry circle with egg, then gently stretch the larger circle over the mushroom, then press the edges together with a fork.
Brush each generously with the egg.
Bake for 40 minutes until golden, then leave to cool for a few minutes before serving.