Heat oven to 200C/fan 180C/gas 6. Heat half the oil in a medium frying pan, then gently fry the onions for 12-15 mins until softened and lightly browned. Tip the onions into a bowl and mix with the artichoke hearts, season if you like and set aside. Heat the remaining oil in the same pan (there’s no need to clean it) over a high-ish heat. Add the mushrooms, then stir-fry for 2-3 mins until soft, throw in the garlic and thyme and continue to cook for a minute. Remove from the heat, season well and allow to cool.
On a floured surface, roll out the pastry into a rough circle about 40cm in diameter and drape over a large baking sheet.
Pile the onions and artichokes into the middle of the pastry and spread them out evenly, leaving a 10cm border around the edge, then pile the mushrooms on top.
Bring the edges of the pastry up over the filling. Brush the exposed pastry edge with the egg glaze. Bake for 20-25 mins until the pastry is crisp and golden brown. Sprinkle with parsley and serve immediately with the sour cream and relish.