Heat the butter and oil in a frying pan until the butter has melted. Cook the onion over a medium heat for about 10 minutes until beautifully golden, stirring often. Stir in the sugar and cook for another couple of minutes. Tip the onion and juices into a bowl and set aside. Preheat the oven to 200C/gas 6/fan 180C.
For the pastry, rub the butter into the flour to make fine crumbs. Stir in the parmesan, thyme and a pinch of salt. Add the egg yolk and 2 tbsp cold water, then mix to make a dough. Wrap in cling film.
For the tomatoes, heat the butter and oil in a 20cm tart tatin tin on the hob until quite hot. Stir in the sugar and garlic, then put in the plum tomatoes cut-side down with a few thyme sprigs, and sizzle for no more than 1 minute. Scatter in the whole cherry tomatoes and tuck in a bit more thyme. Take off the heat and spread the onions on top. Season with salt and pepper.
Roll out the pastry until it's slightly bigger than the top of the tin. Lay it over the onions and tuck any excess down the sides.
Bake on a baking sheet for 25 minutes until golden. Cool for 5 minutes, invert a plate over the top and upturn the tart onto it. Scatter with extra thyme and black pepper.