1. Melt the butter in a large enameled cast-iron casserole. Add the onions and a pinch of salt, cover and cook over moderate heat, stirring once or twice, until the onions soften, about 10 minutes. Uncover and cook over moderate heat, stirring frequently, until the onions are lightly browned, about 40 minutes.
2. Stir in the sherry. Add the stock and bouquet garni and bring to a boil. Cover and simmer over low heat until the soup has a deep flavor, about 30 minutes. Discard the bouquet garni and season the soup with salt and pepper.
3. Preheat the oven to 350°. Butter the bread on both sides and place on a baking sheet. Toast the bread for 15 minutes, turning the slices halfway through, until golden and crisp but not dried out. Raise the oven temperature to 425°.
4. Bring the soup to a simmer, ladle it into 4 deep ovenproof bowls and sprinkle with half of the cheese. Place a crouton in each bowl and sprinkle on the remaining cheese. Bake the bowls of soup on a baking sheet in the middle of the oven for 10 minutes, or until the cheese is bubbling. Serve hot.
Make Ahead: The recipe can be prepared through Step 3 up to 3 days ahead.
Wine Recommendation: A light, fruity Beaujolais will match the sweetness of the onions and the nuttiness of the Gruyère in this rich soup. Look for the 1999 Joseph Drouhin Beaujolais-Villages or Moulin-à-Vent.