Blanch the green beans and pearl onions by placing them into a large pot of rapidly boiling water. Cook them for about 2 minutes, until the green beans have brightened in color. Remove the vegetables from the boiling water with a strainer then plunge into an ice bath to stop the cooking process. Drain them, then remove the skins from the onions and set aside.
Coat a skillet with olive oil and butter over medium heat. Sweat the garlic and shallot down until they caramelize. Add the bay leaves then the assorted mushrooms. Stir to combine, season with salt, pepper and thyme. Sprinkle the mixture with flour to tighten up. Add the milk and boil for 3 minutes to thicken.
Place the green beans and pearl onions in a 2-quart casserole dish. Pour the "mushroom soup" over the vegetables. Toss to make sure the vegetables are well coated. Bake in a preheated 350 degree oven for 30 minutes. Top with fried onions and continue to bake for 10 minutes.