I know the advice is not to water onions or garlic but I think you have to if it gets really dry, otherwise they run to seed. Best to water around them so as not to get the leaves wet.
My garlic just decided they were ready last week: no scapes, just went completely yellow. When I checked they were in three to four inches of dry soil, but the bulbs were mostly ok. Seems I won't have to hang them out to dry because they dried in the ground!