Chop the leek into thick slices, then rinse in a colander to remove any grit, and finely dice the celery.
Warm the olive oil in a large saucepan or casserole dish over medium heat. Once hot, add the chopped leek and celery. Lower the heat and cook, stirring regularly, for around 10 minutes until the leek is soft.
Meanwhile chop the garlic cloves into thin slices. Add the garlic and rosemary to the vegetables and cook for 30 seconds to release their fragrance. Lower the heat.
Combine the dried porcini with 400ml (around 2 cups) of the boiling water. Leave to soak for 1 minute then pour it all into the saucepan. Stir to loosen any leek or celery stuck to the bottom of the pan then add the crumbled vegetable stock cube and another 500ml of the boiling water. (If you're not using the porcini, add around 1 lt boiling water with the stock cube.)
Increase the heat to high and bring the soup to a boil. Add the bouquet garni and the drained and rinsed white beans. Stir everything together and let it boil for 5 minutes. Season with salt and black pepper.
At this point, if you are not serving the soup on the same day, you can leave it to cool and then place it in the fridge overnight. This allows the flavours to macerate and brood a bit.
When you're ready to add the pasta, add the rest of the water, bring the soup to the boil and pour in the pasta. Cook according to packet instructions. When the pasta is al dente, add the spinach and celery leaves if using and stir into the soup to wilt. Season with a little more salt.
Serve the minestrone soup with a spoonful of pesto on top if you wish - vegan or otherwise