I'm a user of NetBeans, because it used to be the best bang for no bucks. The code completion was always good, even with something as huge and extensive as Symfony 2. However, I got a new mac, wanted to download Netbeans, installed it, etc.
The completion was always so good that I could do this for example:
<?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 */
?>
But they are not coming anymore. The hinting level is not deep enough. For example when using the 'new' keyword it will give hints on namespaces and classes I probably would use but that's it, nothing deeper then that.
I tried a whole lot with the settings and nothing really worked. Also: installing the Symfony plugin did not seem to work for this.
What should I do?
I really need those hints, since Symfony contains millions of functions and always searching the API is too time-consuming.
This comes from a modification appeared in vendor/symfony/src/Symfony/Bundle/Doctrine/Bundle/Registry.php. The phpDoc for getEntityManager() method has been changed to :
/**
* Gets a named entity manager.
*
* @param string $name The entity manager name (null for the default one)
*
* @return EntityManager
*/
public function getEntityManager($name = null)
{
// ...
}
The working phpDoc for NetBeans is :
/**
* 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)
{
// ...
}
This has been fixed on github repository with commit 353085857ba6d17694e5322e2eefb0d8fec6380d on symfony/symfony repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With