Pulse the flour, icing sugar and butter in a food processor until it resembles breadcrumbs. Add the egg and pulse until the dough comes together in a smooth ball, adding the milk if necessary. Wrap in clingfilm and chill in the fridge for 20 minutes.
Meanwhile, in a bowl, mix together the apples, cornflour, lemon zest and juice, sugar and spices. Place in a 1-litre ovenproof dish and brush the edges of the dish with a little beaten egg. Preheat the oven to 190°C, fan 170°C, gas 5.
Roll out the pastry to a thickness of 0.5cm. Drape over the apple mixture and pinch the edges to secure onto the rim. Make a 1cm hole in the centre and decorate the top with leaves made from leftover pastry, securing with the extra beaten egg.
Brush all over with the remaining egg and bake for 20 minutes. Reduce the oven to 180°C, fan 160°C, gas 4 and cook for a further 15-20 minutes, until golden.