Telling the visa officer that you intend to pursue your Ph.D. after completing your masters isn’t a big deal, as long as you make it clear that your ultimate goal after completing both your masters and Ph.D. in Germany is to return home and use the knowledge that you have gained to better your home country. Never paint a picture that you intend to stay and work in Germany after completing your studies.
It is always important to remember that a student visa is granted with the intention that an applicant will return to his home country after his studies. Even though most students would like to stay permanently in Germany once they complete their studies, this is not what the German government wants. Only an exceptional few are allowed to stay. They are hoping that a large percentage of students will take the knowledge they learned abroad and apply it in their home countries.