1. Preheat the oven to 200°C/180°C fan/gas 6.
2. Cook the pasta according to the instructions on the packet.
3. Heat the oil and fry the onion for 5 minutes.
4. Add the flour and cook for a further 2 minutes.
5. Remove the pan from the heat and gradually add stock and milk, stirring well between each addition.
6. Return the pan to the heat and bring to the boil, stirring constantly. Simmer until the sauce thickens.
7. Off the heat, add the cooked chicken, broccoli and pasta, then the herbs and season with salt and pepper.
8. Put the mixture in an ovenproof dish, sprinkle with the Cheddar cheese and the Parmesan, if using, and then bake for 35 minutes.
9. Allow to stand for a few minutes before serving and garnish with torn basil