Preheat oven to 200c (180c fan/390f)
Cut the pumpkin into large chunks and set out on a baking sheet. Cut the top off of a head of garlic and drizzle with olive oil – then place cut side down on the baking sheet.
Drizzle everything with olive oil and season with salt, then roast for 45 minutes turning halfway.
Once cooled, remove the pumpkin flesh from the skin (should yield ~500g cooked weight) and add it to the blender. Squeeze the garlic out directly into the blender, along with the ricotta and Parmigiano. Blend to form a smooth filling. Season well with salt to taste.
Refrigerate until you’re ready to use.
Shaping the casoncelli
Divide the dough into four pieces. Work with one at a time (keep the rest covered so as not to dry out) – flatten the piece with your hand or a rolling pin before passing it through the thickest setting on your pasta machine. Fold the edges in to create a neat rectangle that fits the width of your pasta machine, and run it through the thickest setting again and repeat until your dough is uniform in shape and fits the width of the machine.
Continue passing your dough through the machine, working through each thickness setting until you get to setting 7 on a Marcato atlas (typically fourth to last setting on most machines). If your preference is for a slightly thicker or thinner pasta, go for it.
Use a knife or bicycle cutter to cut out squares of 6x6cm on your rolled sheet of dough. Use clingfilm or a clean tea towel to keep the other squares covered while you’re not working with them to prevent them from drying out.
Place a square with a point at north and south. Pipe some filling on the lower half and fold the south point up to meet the north point, press to seal.
Roll the bottom half over once, then use your index finger on each hand to press and seal the filling on the left and right sides to form an enclosed pocket.
Place each formed shape onto a clean tea towel or a baking sheet dusted with fine semolina and set aside.
NB: any leftover filling can be refrigerated or frozen to be used another time.