For the Topping: Pulse bread, butter, salt and pepper in food processor until mixture resembles coarse crumbs, about ten 1-second pulses. Transfer to a large bowl and toss with onions; set aside.
For the Beans and Sauce: Preheat oven to 425 degrees F. Fill a large bowl with ice water. Bring 4 quarts of water to a boil in a large pot or Dutch oven. Add 2 tablespoons salt and the beans. Cook the beans until bright green and crisp-tender, about 6 minutes. Drain beans in colander and plunge immediately into ice water to stop cooking. Spread beans on paper towel-lined baking sheet to drain.
Add butter to now-empty pot and melt over medium-high heat. Add mushrooms, garlic, salt, and pepper; cook until mushrooms release moisture and liquid evaporates, about 6 minutes. Add flour and cook for 1 minute, stirring constantly. Stir in broth and bring to simmer, stirring constantly. Add cream, reduce heat to medium, and simmer until sauce is thickened and reduced to 3½ cups, about 12 minutes. Season with salt and pepper to taste.
Add green beans to sauce and stir until evenly coated. Arrange in an even layer in a 9x13-inch baking dish. Sprinkle evenly with the topping and bake until top is golden brown and sauce is bubbling around edges, about 15 minutes. Serve immediately. Leftovers can be stored in an airtight container in the refrigerator for up to 4 days.
Green Beans: The recipe calls for fresh, but you can substitute frozen without changing anything else. While not preferred, canned green beans can be used; drain and skip the blanching step.
Mushrooms: You can substitute cremini or baby bella mushrooms, or eliminate them entirely if necessary due to an allergy. No adjustments are necessary.
To Add Bacon and Cheese: To take this casserole up another notch, cook and crumble 8 ounces of bacon and stir it into the mushroom cream sauce along with the green beans. For a cheesy version, add 6 ounces of shredded cheese (choose a favorite - cheddar would be great, but you could use Monterey Jack, pepper jack, Swiss, gouda, or any combination!) to the mushroom cream sauce before stirring in the green beans; or you could add half of the cheese to the sauce and toss the other half with the topping.
The Breadcrumbs: These are made by pulsing fresh bread with butter, salt, and pepper; however you can easily substitute plain panko breadcrumbs if you'd like (use about 1 cup).
To Make Homemade Onions for Topping: If you want to go 100% homemade and eliminate the canned fried onions, you can make your own caramelized onions. Thinly slice 2 sweet onions and sauté in 2 tablespoons of unsalted butter over medium-high heat for about 10 minutes. Reduce heat to medium-low, sprinkle with salt and cook, stirring occasionally, for about 30 minutes, or until the onions are golden, caramelized and soft. Set aside to cool before combining with remainder of crumb topping. Proceed with the recipe as directed.
To Prepare Ahead of Time: Store the bread crumb topping in an airtight container in the refrigerator and combine with the onions just before cooking. Combine the beans and cooled sauce in a baking dish, cover with plastic wrap, and refrigerate for up to 24 hours. To serve, remove the plastic wrap and heat the casserole in a 425-degree oven for 10 minutes, then add the topping and bake as directed.
To Halve the Recipe: This recipe can be halved and baked in a 2-quart (or 8-inch square) baking dish. If making a half batch, reduce the cooking time of the sauce in Step 3 to about 6 minutes (1¾ cups) and the baking time in Step 4 to 10 minutes.
Storage: Leftovers can be stored in an airtight container in the refrigerator for up to 4 days.
Freezing Instructions: While green bean casserole is best eaten fresh, you CAN freeze it. Assemble it (minus the topping), cover in a layer of plastic wrap and foil, then freeze for up to 3 months. Thaw in the refrigerator overnight, add the topping, and bake as directed, adding an extra 5 to 10 minutes to the bake time.