An Oracle blog about NetBeans for PHP

Initial Symfony support

Guest Author

Today, I would like to inform you that we have added initial support for the popular PHP framework - Symfony (the most voted issue in NetBeans IssueZilla).

Please notice that the support is still quite minimal and we would like to improve it a lot, there are still many things to do. So, let's have a look what's available right now.

Existing Symfony projects should be recognized automatically but of course, one can create a new PHP project with Symfony framework:

New PHP projectwith Symfony framework

The main support now is the possibility to run Symfony commands:

Run Symfony Command

The UI for the commands allows to:

  • filter the Symfony commands (1),
  • specify command parameters (2),
  • select a command (3),
  • see help of a command (4) and
  • preview the whole command that will be run (5).

UI for Symfony Commands

Please notice that the list of commands is project specific, it means that if one uses e.g. Doctrine instead of Propel, no Propel commands are listed, just the Doctrine ones. Also, all the commands from project's Symfony plugins should be available.

Of course, the output of the currently running command is displayed in the Output window, directly in the IDE.

Output of Symfony Command


It could be useful that one can specify shortcuts for Symfony actions.

NetBeans Keymap

The Symfony script should be detected automatically but it can happen that it's not found so one can specify it in the IDE Options.

Symfony Options

That's all for today, now it's your turn so please, test it and report all the issues or enhancements you find in NetBeans IssueZilla (component php, subcomponent symfony).

Thanks a lot and happy Symfony coding!

Join the discussion

Comments ( 46 )
  • Sam Monday, July 6, 2009

    Is 'run command' functionality implemented as console wrapper? Are allowed commands list and path hardcoded? If no, it's possibly to extend it to run virtually anything this way: framework consoles, phing, custom php files.

  • Leszczu Monday, July 6, 2009

    Great to hear that, it'll greatly increase work speed. Thank you, Netbeans Team!

  • e.s.t Monday, July 6, 2009

    Such a great news, I can hardly believe that it's monday! :)

  • Rob Monday, July 6, 2009

    That's fantastic! I can not wait to see what the future holds for NB.

  • Markus F Monday, July 6, 2009

    Great! Now i would like to see Zend Framework too :D

  • _imc_ Monday, July 6, 2009

    "Unknown version of Symfony script detectd, support might not work"


  • Skyblaze Monday, July 6, 2009

    I will wait for Yii framework support

  • Ben Haines Monday, July 6, 2009

    Great news! Thank you very very much!

  • Marijn Huizendveld Monday, July 6, 2009

    Looks promising. I do think that the Symfony script option should be project bound, one might use different versions of Symfony for different projects.

  • qingyue Monday, July 6, 2009

    When will netbeans support Zend Framework?

  • Tomas Mysik Tuesday, July 7, 2009

    To Sam:

    Sorry, I don't understand exactly what you want to achieve. Could you be more specific please?



  • Tomas Mysik Tuesday, July 7, 2009

    To Markus:

    What exact support for Zend framework do you mean? Could you please update issue 146028:


    The difference is that ZF does not use command line (or am I wrong)? So if you put ZF on your PHP Include Path, code completion should work. Or do you mean anything else?



  • Tomas Mysik Tuesday, July 7, 2009

    To _imc_:

    Is this your case as well?


    Or do you mean anything else?



  • Tomas Mysik Tuesday, July 7, 2009

    To Marijn Huizendveld:

    Yes, this is planned.



  • @Tomas Mysik by Marijn Huizendveld Tuesday, July 7, 2009

    Nice, I really think this is required to make it useful for the group of developers that work on numerous projects.

  • Stefan Tuesday, July 7, 2009


    I'm using this on Linux and Mac. And there I have two different problems:

    On Linux I have the same problem as _imc_. I use the 1.2.7 version. So the issue is not same for me...

    On my Mac he told me, that there is no pgsql support. But when I use the Command Line everyting works fine.

    Hope somebody can help mne with this problems.



  • Gabriel Tuesday, July 7, 2009

    Really interesting, and a big help, just one question, this initial support is available in NB6.7 or only in NB7 ?

  • Kamil Ż. Tuesday, July 7, 2009

    Under Windows XP Pro SP2 when you pointing the location of symfony script you must point a file (folders aren't allowed). For symfony-1.2.7 instalation (not sandbox) you need to point file '.\\lib\\vendor\\symfony\\data\\bin\\symfony.bat' (when you choose 'symfony' file there will be problems with recognizing framework version so you will not be able to create new symfony project.

    Here is link to the build of netbeans 6.7 supporting symfony:


  • Tomas Mysik Wednesday, July 8, 2009

    To Marijn Huizendveld:

    I have a prototype, you can progress here:



  • Tomas Mysik Wednesday, July 8, 2009

    To Stefan:

    Please, as written in blog post, submit a bug report otherwise we are not able to help you.

    (Likely only for your Linux problem, the other is likely problem with your installation; you can ask for help on our PHP users mailing list [1])



    [1] http://www.netbeans.org/community/lists/top.html

  • Tomas Mysik Wednesday, July 8, 2009

    To Gabriel:

    As written in the blog post, only in development version of NetBeans. The next milestone will include this support, of course.


  • Tomas Mysik Wednesday, July 8, 2009

    To Kamil Ż:

    I'm working on it, it will be solved as part of the issue:


    (Symfony script will be run using PHP interpreter so no need to select a BAT file; I have a prototype that seems to work well, it would be great if someone on Windows could test it more; feel free to add yourself to CC of the bug).



  • Whisller Wednesday, July 8, 2009

    It is a really great news for whole symfony's community :-)

  • Tomas Mysik Wednesday, July 8, 2009

    FYI issue


    is fixed now (for testing, use PHP Build #545 or newer).

    Thanks a lot,


  • Sam Wednesday, July 8, 2009

    @Tomas Mysik:

    I mean it probably can be extended to support not only Symfony but consoles in general. To do this you can:

    1. Allow multiple console profiles for a project.

    2. Allow to specify console entry script and parameters.

    3. In these parameters allow to specify commands for code complete feature that appears in console dialogue.

    4. Allow to export / import profiles so people will be able to share them.

    This way you'll get console support for nearly all existing frameworks in a short time. Not only Symfony.

  • Urkman Wednesday, July 8, 2009
  • Tomas Mysik Wednesday, July 8, 2009

    To Sam:

    It's not so easy - there's still a need to have some code in Java (so it means you have to create an NB module). But, as you say, "console support" is in general part so it should be quite easy to implement other frameworks that work in similar way.


  • Tomas Mysik Wednesday, July 8, 2009

    To Urkman:

    @property is already supported (search our blog), not sure about @method. I will submit a bug report.



  • Urkman Wednesday, July 8, 2009

    To Mysik:

    Thanks for that. I just tested "@method" and it seems not to be included.


  • Michal Wednesday, July 8, 2009


    Would it be possible to create some kind of mechanism for extending/overriding type recognition?

    So, this could work:

    // $table has type Some_Table or Doctrine_Table (where project doesn't contain class Some_Table)

    $table = Doctrine::getTable("Some_Table"); ?

    // in action (and other classes extending sfComponent) :

    // $user has type myUser or other (depends on factories.yml)

    $user = $this->getUser();

    There are many such individual cases. Surely it would be helpful but i'm not sure if it isn't too overcomplicated.

  • Tomas Mysik Wednesday, July 8, 2009

    To Urkman:


    Feel free to add yourself to CC.


  • Tomas Mysik Wednesday, July 8, 2009
  • Michal Wednesday, July 8, 2009

    To Tomas:

    Yeah, i know about @var comment. But with it you have to write (if you would like to have content asist for myCustomMethod) :

    /\* @var $myTable MyTable \*/

    $myTable = Doctrine::getTable("MyTable");

    $data = $myTable->myCustomMethod();

    instead of:

    $data = Doctrine::getTable("MyTable")->myCustomMethod();

    But as i've written this would probably require massive ammount of work (to support all cases).

  • Tomas Mysik Wednesday, July 8, 2009

    To Michal:

    Sorry, I can't see any other possibility how to tell which type the variable is.

    (Generics from Java would help here.)


  • Michal Wednesday, July 8, 2009

    To Tomas:

    What about something like that:

    $data = Doctrine::/\* @var MyTable \*/getTable("MyTable")->myCustomMethod();

    $user = $this->/\* @var MyUser\*/getUser()->myCustomMethod();


    $data = Doctrine::/\*<MyTable>\*/getTable("MyTable")->myCustomMethod();

    $user = $this->/\*<MyUser>\*/getUser()->myCustomMethod();

    I know it don't look well, but this is impossible(parser error):

    $user = (/\*<MyUser>\*/$this->getUser())->myCustomMethod();

  • Tomas Mysik Thursday, July 9, 2009

    To Michal:

    Personally, I think that this situation is solvable using the current IDE capabilities. But this can change, feel free to file an enhancement against PHP editor.



  • Sid Thursday, July 9, 2009

    Very nice the tool, Im using it.

    Just a problem: When you use ALT + TAB the menu is selected.

    also: How do I post tickets to it???

  • Tomas Mysik Thursday, July 9, 2009

    To Sid:

    Thanks for feedback. For reporting issues use


    (as written in the blog post).



  • hantsy Monday, July 13, 2009

    I would like use a shell console, rather than the Run command dialog.

    JEdit provide a generic console for many purposes, eg. System shell command(Windows cmd/bash), ant, maven etc.

  • Nahuel Friday, August 14, 2009

    Great work! I've been using it, and it works like a charm, so far.. Are there any plans of giving a shortcut to switch from an action to its template and viceversa? Something like that would be great!

  • Geoff Che Wednesday, September 9, 2009

    This was always the one thing symfony sorely needed - a decent GUI admin. Fabien never really seemed to understand this aspect. Many thanks for your great efforts.

  • Fabrice Wednesday, September 9, 2009

    Marijn, Fabien suggests:

    Since the symfony framework evolves quickly, a new stable version could very well be released only a few days after your first installation. You need to think of the framework upgrade as a major concern, and that's another reason why you should share one instance of the symfony libraries across all your symfony projects.


  • links of london Thursday, October 29, 2009

    It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.

  • Tiffany and Links Friday, November 13, 2009

    I think that this situation is solvable using the current IDE capabilities. But this can change, feel free to file an enhancement against PHP editor.

  • prgTW Friday, December 11, 2009

    Please give support for CakePHP framework.

  • Ehsan Chavoshi Friday, March 5, 2010

    Thank you for this greate IDE and symfony support.

    i found this IDE today an im sorry that i didnt use it before.

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