An Oracle blog about NetBeans for PHP

Doctrine2 support added

Hi  all, today we would like to inform all the Doctrine2 PHP ORM framework users that their favorite framework is now supported in NetBeans.

First, as always, be sure that NetBeans knows about your Doctrine2 installation:

Docrtine2 IDE Options

If you have installed Doctrine2 via PEAR, the Doctrine2 script will be detected automatically.

Next, you need to tell NetBeans that your existing PHP project uses Doctrine2 - open Project Properties dialog and enable its support.

Enable support for Docrine2

Now, you will be able to run Doctrine2 commands right from the IDE. Please notice that the project now has a Doctrine2 badge icon.

Run Doctrine2 Command

All the possible Doctrine2 commands will appear.

Doctrine2 Commands

They can be run the same way as for the other supported frameworks. It means also that the output of the invoked command will be available in the Output window.

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans BugZilla (component php, subcomponent Doctrine).

Join the discussion

Comments ( 24 )
  • guest Monday, January 30, 2012

    So what about Doctrine 2 annotations?

  • Tomas Mysik Monday, January 30, 2012

    @guest: We have it in our development plan for NB 7.2 but we cannot promise anything since the time as well as resources are limited.

  • guest Monday, January 30, 2012

    Excellent!!!! Netbeans is the best IDE.

  • Nasreddine Tuesday, January 31, 2012


    Will not be a support for Yii framework ?

  • Tomas Mysik Tuesday, January 31, 2012

    @Nasreddine: There is a plugin for Yii framework developed by our community [1] (sorry, no idea how usable it is or what it does exactly and what needs to be done yet). Anyone who wants to help with it is more than welcomed, of course.

    [1] http://hg.netbeans.org/main/contrib/file/tip/php.yii

  • Nasreddine Tuesday, January 31, 2012

    Thanks Tomas Mysik , I'll take a look.

  • pajousek Tuesday, January 31, 2012

    I wish there was a way to somehow get the class info for typehinting when you use $article = $this->entityManager->getRepository('\Entities\Article')->find($id); ... would make Doctrine support even better.

  • PHP Expert Tuesday, January 31, 2012

    Glade to read it.

    Now it's interesting to work with Doctrine2 PHP ORM framework...

  • Tomas Mysik Tuesday, January 31, 2012
  • myth Thursday, February 2, 2012

    Amazing! Netbeans is the best IDE

  • nicholasf Thursday, February 2, 2012

    Nice! Thanks for all these new features! As previously said, having Doctrine 2 annotations would be great in future versions - even if not in 7.2 ... I'll wait :) !

  • Tomas Mysik Thursday, February 2, 2012

    @nicholasf: Thanks! BTW the annotations will be very likely in NB 7.2... ;)

  • guest Monday, February 6, 2012

    How does one get the Doctrine 2 tag on the PHP options as shown in the screen dump?


  • Tomas Mysik Tuesday, February 7, 2012

    @Stephan: One must use the development version of NetBeans (the download link is in the blog post).

  • Frederick Friday, February 10, 2012

    Great news! But how may I got the doctrine2 tab in the Netbeans's options? I'm using Netbeans 7.1 on Ubuntu 10.04.

  • Tomas Mysik Monday, February 13, 2012

    @Frederick: Hi, as I already wrote in my last comment, one must use the development version of NetBeans [1].

    [1] http://bits.netbeans.org/download/trunk/nightly/latest/

  • Zend Framework Thursday, March 22, 2012

    What about using doctrine 2 with Zend Framework or Yii Framework.

  • Tomas Mysik Thursday, March 22, 2012

    @Zend Framework: Sorry, not sure what you mean exactly since Doctrine2 support is independent and can be added to any PHP project.

  • Alex Haan Wednesday, June 13, 2012

    @ Tomas Mysik on January 31, 2012

    I know about that. It's a bit tedious to have to add that manually all the time though. It would be great if typehinting would be automatic based on such codelines.

    NetBeans has some more annoyances though. And I soon hope to find time to look into creating addons for NetBeans myself. Maybe I can find an improvement for this myself too.

  • guest Sunday, June 24, 2012

    I have NetBeans 7.1.2 and there is no Doctrine 2 tab under Options>PHP

    Doctrine 2 has been installed via Pear

    What give?

    Joe Radtke

  • guest Monday, June 25, 2012

    I have NetBeans 7.1.2 and there is no Doctrine 2 tab under Options>PHP

    Doctrine 2 has been installed via Pear

    What give?

    Joe Radtke

  • Tomas Mysik Monday, June 25, 2012

    @Joe Radtke: Doctrine2 framework support is available as part of NetBeans 7.2 (Beta is available).


  • guest Wednesday, February 6, 2013

    I want doctrine run command support in the Zend Framework run command.

    Like this Vidio http://www.youtube.com/watch?v=3xjfbtQtDRE

    How can i do?

    Please help me.

    It's very urgent.

    Thanks in advance.

  • Tomas Mysik Wednesday, February 6, 2013

    To guest: Simply enable Doctrine2 support in Project Properties dialog.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.