Peel and cut the onions into quarters. Heat the honey in a medium size saucepan over low heat, add the olive oil, star anise, thyme and onion quarters. Increase the heat to medium-high and cook for about 2 minutes.
add the water and wine
Pour 30ml of water into the saucepan with onions, season with salt. Lower the heat and cook for about 5 - 10 minutes. Pour in the Port (or Madeira or any other sweet wine), increase the heat and boil for a minute, so that the alcohol evaporates. Remove from the heat and let it cool completely.
Preheat the oven to 190ºC/380ºF. Line a large baking sheet with parchment paper. Roll out the puff pastry into a rectangle about 20cm x 30cm ( 8 x 12 inch), thickness 2-3 mm (1 inch). Brush with an egg wash. Cut the rectangle into four smaller rectangles (about: 10cm x 15cm (4x 6inch). Prick the dough all over with the tines of a fork, leaving a 1,5cm edge around your rectangle. Assemble the dish by filling the base of the pastry case with the onion topping, then laying pieces of mozzarella cheese over. Sprinkle with fresh thyme. Bake for 20 minutes.TipYou can freeze your puff pastry for 5 - 10 minutes, before cutting onto small rectangles. If you cut the puff pastry warm, you will compress the layers of dough and the pastry won't rise as much as it could.
If you are serving this dish as a main dish, double the ingredients. Serve with a bowl of fresh salad or grilled chicken.