Heat a large pot over medium-high heat. Once hot, melt the butter and mix in the olive oil.
Add the onions, sugar and 1 tsp of salt. Cook the onions for 45 minutes to one hour, stirring occasionally. until the onions are a deep caramel color. They should reduce down to about a fourth in volume. Watch them more closely as the end of the cook time nears, as they are more likely to burn. Don't let them char.
Add the minced garlic and cook another minute, stirring occasionally.
If using thing (optional) wine, deglaze the pot with it now. Let it reduce for two minutes.
Add the flour to the pot and stir constantly for three minutes. The onions will begin to thicken into a paste.
Add the beef broth one cup at a time, stirring constantly. Once one cup is mixed in, add another. If, after adding the broth, the soup is still pretty thick (like a gravy) add an extra C of water. You want it to be soup-like at this point. If it is still too thick, add up to one more C of water.
Add the thyme and bay leaf and cover the soup. Reduce the heat to a simmer and cook for 30 minutes, stirring occasionally.
While the soup simmers, heat your over to 350 degrees F. Toast the sliced French bread for 5-7 minutes, or until toasted to a golden brown.
Once the soup has simmered, and the bread is toasted, remove the bay leaf and taste the soup for salt. Then prepare the bowls.
Turn on your broiler. Divide the soup equally into four oven safe bowls (roughly 2.5 C per bowl)
Divide the toasted bread into four and add equal amounts on top of the soup in each bowl. It should float.
Top each bowl with a quarter of the grated cheese and place the bowls in the broiler (pro tip: place the bowls onto a baking sheet first). Broil for 2-3 minutes, until the cheese is melted and bubbly, with just a little char on top.
Serve immediately, being sure to warn your guests of the hot bowls.