Heat the olive oil or vegan butter in a large skillet over medium-high heat. Once hot, add the diced onion and cook, stirring frequently, until softened.
Stir in the minced garlic and mushrooms, lower the heat to medium, and sauté for 4-5 minutes, stirring occasionally, until they release their liquid and begin to brown. If using the optional dried porcini mushrooms, stir them in now.
Sprinkle the flour evenly over the mushroom mixture and cook, stirring constantly, for several minutes until the flour is lightly browned.
Slowly pour in the vegetable stock, whisking continuously to avoid lumps, and bring the mixture to a simmer.
Stir in the chopped rosemary, parsley, tamari, and black pepper. Reduce the heat to low and let the gravy simmer, stirring occasionally for 3-5 minutes, until thickened to your desired consistency.
