5

我是 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 */
?>

但他们不再来了。暗示层次不够深。例如,当使用“new”关键字时,它会提示我可能会使用的命名空间和类,但仅此而已,没有比这更深的了。

我尝试了很多设置,但没有任何效果。另外:安装 Symfony 插件似乎对此不起作用。

我该怎么办?

我真的需要这些提示,因为 Symfony 包含数百万个函数并且总是搜索 API 太费时了。

4

1 回答 1

6

这来自 vendor/symfony/src/Symfony/Bundle/Doctrine/Bundle/Registry.php 中出现的修改。getEntityManager() 方法的 phpDoc 已更改为:

/**
 * Gets a named entity manager.
 *
 * @param string $name The entity manager name (null for the default one)
 *
 * @return EntityManager
 */
public function getEntityManager($name = null)
{
    // ...
}

NetBeans 的工作 phpDoc 是:

/**
 * 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)
{
    // ...
}

这已在 github 存储库中修复,在symfony/symfony 存储库上提交 353085857ba6d17694e5322e2eefb0d8fec6380d 。

于 2012-04-15T23:06:43.077 回答