Put the flour, sugar and yeast in the mixer bowl and stir to combine.
Scatter cubes of butter over the flour so it's evenly distributed then pour in the eggs and lukewarm milk, vanilla and salt.
Attach a dough hook attachment to the mixer then knead on a low speed for 10 minutes (on a KitchenAid mixer I use speed 2).
After 10 minutes the dough should be smooth, elastic and slightly tacky (see recipe notes 1 & 2 if using cups it's important).
Tip the dough out onto a clean work surface (you don't need any flour and extra flour should be avoided if possible). Shape the dough into a smooth ball by kneading it 2-3 times.
Place the dough in a clean bowl lightly greased with oil and cover with plastic wrap. Leave to prove for 2-3 hours or until tripled in size.
Once the dough has risen, tip it out onto a clean work surafce, knock out the air then knead it a few times back into a smooth ball.
Flatten the dough with your hands then roll out on into a rectangle ½ inch (1.5cm) thick.
Use a cookie cutter or glass to cut out round doughnuts about 3.5 inch in diameter. You can cut the scraps into random shapes for frying or re-knead them and roll out again to cut out more doughnuts.
Place the cut out doughnuts on a surface lined with baking parchment and cover loosely with plastic wrap. Leave to prove for 1-1.5 hours or until tripled in size.
While the doughnuts are proving, make the pastry cream and leave to cool (directions below).