For the filling
Preheat the oven to 220°C/425°F/Gas mark 7.
Roll out the pastry to a 20cm/8in square on a lightly floured work surface. Using a sharp knife, mark a square 2cm/1in from the pastry edge, cutting halfway through the pastry. Score the top in a diagonal pattern. Knock up the edges with a kitchen knife and put on a baking tray. Brush the top with beaten egg.
Bake in the oven for 35 minutes or until puffed and golden.
Cut out the central square. Discard the soft pastry inside the case, leaving the base intact. Return to the oven, with the central square, for 10 minutes.
Make the filling by melting the butter in a frying pan and sautéeing the mushrooms, stirring, over a high heat for 3 minutes. Add the wine and cook, stirring occasionally, for 10 minutes, until the mushrooms have softened. Stir in the cream and chervil, and season with salt and pepper.
Pile the filling into the pastry case. Top with the pastry square, and serve immediately