All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
The scholars defined a companion as the one who personally met the Prophet while he was alive and believed in him, and died on belief. This was only possible for the companions of the Prophet . As regards the person who saw him in a dream, there is no doubt that he really saw him as clarified in the Sunnah. However, even a person who saw the Prophet in a dream during his reign but was not able to meet him in person, is not considered a companion.
Allaah Knows best.