Fry the onions, garlic and mushrooms (whole or halved, depending on size) in hot olive oil and season with salt, pepper and a little sugar. Add the broth, vinegar and sprigs of rosemary.
Cover and simmer over low / medium heat for about 10 minutes.
Remove the rosemary, add the chopped basil, stir, season again if necessary, leave to rest briefly.