Doctrine2 Netbeans IDE problems with code completion

Doctrine2/Symfony2 project? You write a code, press ctrl + space and… no all code completion… Why?

$em = $this->getDoctrine()->getManager();
$query = $em-> (should be createQuery, createBuilderQuery BUT nothing like that)

Solutions is simple (as usual…) but take some time to know how…Simply you must declare type of $em variable. Just put

$em = $this->getDoctrine()->getManager();

/* @var $em \Doctrine\ORM\EntityManager */

That is! It works for me in Netbeans 7.3RC1

Leave a Comment:

3 comments
Wagner says 7 December 2013

Thanks, solve my problem with a code completion using ZF2 + doctrine!

Reply
admin says 7 January 2014

Nice to read this! 🙂

Reply
Stas Ustimenko says 20 January 2014

Code completion in the Codelobster PHP Edition works much better

Reply
Add Your Reply