Qua*_*ant 5 php netbeans symfony
我是NetBeans的用户,因为它曾经是最好的爆炸,没有钱.代码完成总是很好,即使有像Symfony 2那样庞大和广泛的东西.但是,我有一个新的mac,想下载Netbeans,安装它,等等.
完成总是很好,我可以做到这一点,例如:
<?php
// assuming a controller scope here.
public function anyAction()
{
$em = $this->getDoctrine()->getEntityManager();
$em-> /* and here there would have been a whole lot of possible hints, methods from
the EntityManager object on my old NetBeans install, and now it says: no hints */
?>
Run Code Online (Sandbox Code Playgroud)
但他们不再来了.暗示水平不够深.例如,当使用'new'关键字时,它会给出我可能会使用的命名空间和类的提示,但就是这样,没有比那更深的了.
我尝试了很多设置并没有真正起作用.另外:安装Symfony插件似乎不适用于此.
我该怎么办?
我真的需要这些提示,因为Symfony包含数百万个函数,并且总是搜索API太耗时.
这来自vendor/symfony/src/Symfony/Bundle/Doctrine/Bundle/Registry.php中的修改.phpDoc for getEntityManager()方法已更改为:
/**
* Gets a named entity manager.
*
* @param string $name The entity manager name (null for the default one)
*
* @return EntityManager
*/
public function getEntityManager($name = null)
{
// ...
}
Run Code Online (Sandbox Code Playgroud)
工作的phpDoc for NetBeans是:
/**
* Gets a named entity manager.
*
* @param string $name The entity manager name (null for the default one)
*
* @return \Doctrine\ORM\EntityManager
*/
public function getEntityManager($name = null)
{
// ...
}
Run Code Online (Sandbox Code Playgroud)
已在symfony/symfony存储库上使用commit 353085857ba6d17694e5322e2eefb0d8fec6380d在github存储库上修复此问题.