Green Bean and Mushroom Casserole with Crispy Fried Onions

Ingredients:
2 pounds mixed wild mushrooms, trimmed, halved or quartered if large (about 1/2" pieces)
4 sprigs thyme, divided
1/4 cup extra-virgin olive oil
Kosher salt, freshly ground pepper
2 pounds green beans (preferably haricots verts), trimmed, cut in half on the diagonal
2 tablespoons unsalted butter
1/3 cup finely chopped red onion
2 large garlic cloves, very thinly sliced
2 tablespoons all-purpose flour
2 cups heavy cream, divided
1 cup low-sodium chicken or vegetable broth
2 dried bay leaves
1 1/2 teaspoons finely grated lemon zest (from 1 medium lemon)
Canola or vegetable oil (for frying)
1/2 cup fine-grind cornmeal
2 tablespoons cornstarch
1 1/2 teaspoons paprika
1 teaspoon ground coriander
1 teaspoon ground cumin
1 medium red onion, thinly sliced into 1/8" rings crosswise with a mandoline or very sharp knife, separated into rings
Kosher salt, freshly ground pepper
A 3-quart (13x9") baking dish

Instructions:
Preheat oven to 425ºF. Line 2 rimmed baking sheets with parchment paper. Arrange mushrooms and 2 thyme sprigs in a single layer on prepared baking sheets. Drizzle with oil; season with 3/4 tsp. salt and 1/2 tsp. pepper. Roast mushrooms, stirring once and rotating pan halfway through, until lightly golden, crisp-tender, and liquid is evaporated (watch carefully as cook time can vary between types of mushrooms), 25–35 minutes. Remove sheets from oven and reduce oven temperature to 375ºF.
Meanwhile, cook green beans in a large pot of boiling generously salted water until crisp-tender, 3–5 minutes. Drain in a colander and rinse under cold water to stop cooking. Drain well, then layer on a rimmed baking sheet with paper towels and pat dry. Wipe pot dry.
Melt butter over medium-low heat in same pot. Add onion and garlic and cook, stirring occasionally, until tender, 5–8 minutes. Stir in flour and cook, stirring occasionally, until aroma is mildly nutty, 4–6 minutes. Add 3 Tbsp. cream and stir well to combine. Repeat twice, then stir in remaining cream, broth, bay leaves, and remaining 2 thyme sprigs. Bring to a simmer and cook, stirring occasionally and scraping sides of pot, until sauce is the consistency of slightly thickened cream and coats the back of a wooden spoon, about 20 minutes (do not over-reduce). Discard thyme and bay leaves. Stir in zest, 1/2 tsp. salt, and 1/4 tsp. pepper.
Arrange beans and mushrooms in 3-qt. baking dish. Pour cream sauce over; stir to evenly coat. Bake casserole until sauce is thickened and bubbling around the edges, about 20 minutes.
Pour oil into a large wide pot or high-sided skillet to a depth of 1/2". Heat over medium-high until hot but not smoking (about 350°F on a deep-fry thermometer). Line a rimmed baking sheet with paper towels.
Whisk cornmeal, cornstarch, paprika, coriander, and cumin in a large shallow bowl. Toss onion rings in cornstarch mixture to coat.
Working in batches, fry onion rings, stirring and turning occasionally, until golden and crisp, 2–3 minutes. Using tongs or a slotted spoon, transfer to prepared sheet to drain. Season with salt and pepper while hot.
Arrange beans and mushrooms in a 3-quart baking dish. Pour cream sauce over; stir to evenly coat. Bake at 375ºF until sauce is thickened and bubbling around edges, about 20 minutes.
Top casserole with fried onions and serve warm.
Onions can be fried 1 day ahead. Let cool. Arrange in a flat layer on a paper towel-lined rimmed baking sheet, cover loosely with foil, and store at room temperature.
Green beans and mushrooms can be cooked 3 days ahead; keep chilled in separate airtight containers. Let come to room temperature before using.