i have phtml file and i declare in the Block\login.php as $_template = "phtml path",
its working fine but not for MEQP2 its giving WARNING | Property name "$_template" should not be prefixed with an underscore to indicate visibility;
when i remove the underscore with veriable of $template then magento view is not working. i already use the upgrade:setup command but not working fine. then what i do?
It seems you're using the right variable: https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/View/Element/Tem...
Maybe you can try using layout files to set the template?