Preheat oven to 400 degrees F.
Cut ½" strips off the end of each side of the puff pastry, and set on top of the puff pastry square, making a crust.
Place puff pastry on baking sheet and poke the center with a fork.
Whisk together egg yolk and water.
Brush puff pastry with egg yolk and water.
Bake in preheated oven for 15 minutes.
While puff pastry is baking, prepare the mushrooms.
Melt butter in large skillet.
Add shallots and mushrooms, cooking until mushrooms are tender and liquid is evaporated.
Season with salt.
Add garlic, cooking another minute.
Add sherry and cook until it has evaporated.
Once puff pastry is done, remove from oven. Reduce oven temperature to 350 degrees F.
Top with cooked mushroom and shallot mixture.
Sprinkle with cheese.
Bake for 10 minutes, until cheese is melted and puff pastry is golden brown.
Cut into squares and enjoy!