Jan 06 2010

Free opensource Symfony-friendly IDE: NetBeans 6.8

Category: Articles,PHPFractalizeR @ 8:03 pm

My search for a good PHP IDE never stops 😉 My choice was Zend Studio until recently. But Zend Studio is not free and it’s free analogue – PDT – lacks some features like refactoring (PDT is also mainly developed by Zend, so, I think, Zend will always keep it low to prevent competition with Zend Studio). Also, it is monstrous (More than 300Mb installer) and it definitely lacks good Symfony support.

Recently I came across NetBeans, which is now free and developed by Sun. Sun seem to abandon all own IDE projects in favour of NetBeans, so this is a somehow strong foundation.

Oh… 25Mb installer only for PHP version 😉 And… it is easy to use. Very. I would like to guide you through the creation of new symfony project in NetBeans.

You need Symfony to be installed on your PC before we proceed.

NetBeans can be downloaded from this page. Choose PHP version. It already includes Symfony plugin. Run downloaded installer and wait for completion. Start IDE. Select File -> New Project. Choose PHP Application. You will be guided through a series of steps to configure your project.

Symfony NetBeans - NewProject1

Symfony NetBeans - NewProject1

Symfony NetBeans - NewProject2

Symfony NetBeans - NewProject2

Symfony NetBeans - NewProject3

Symfony NetBeans - NewProject3

NewProject4 - Symfony Settings

NewProject4 - Symfony Settings

On the step 4, it is recommended to click Options link and check if Symfony settings for the project are configured correctly. NetBeans will try to automatically find Symfony files if you installed it using PEAR installer (it automatically adds Symfony binary to search path).

NewProject5 - Symfony Project Options

NewProject5 - Symfony Project Options

Press finish button. IDE will now execute Symfony task to create a new project with all the settings you entered.

Every symfony task can be executed from IDE by right-clicking project root.

IDE - Execute Symfony Tasks

IDE - Execute Symfony Tasks

Let’s now create a new module.

IDE Create Symfony Module

IDE Create Symfony Module

IDE - Action Created

Now one more important trick. Navigate inside the action, type “$this->” on the new line and wait a little for code completion to be invoked. You can see now, that autocompletion is broken because IDE doesn’t know anything about Symfony classes. But this can be easily corrected.

Invoke Project Properties by right-clicking project root.

IDE - Project Properties

IDE - Project Properties

And add your Symfony source folder to the list

IDE - Add Include Path

IDE - Add Include Path

Now wait a little while NetBeans parses all Symfony classes.

IDE - Parsing Classes

IDE - Parsing Classes

And now you can reinvoke code completion and see, that everything is allright:

IDE - Code Completion Is Ok

IDE - Code Completion Is Ok

Charming, isn’t it?

NetBeans has almost everything you need. And if it doesn’t have something, plugin community, probably, have: http://plugins.netbeans.org/PluginPortal/

IDE - Plugins

IDE - Plugins

Tags: , ,

7 Responses to “Free opensource Symfony-friendly IDE: NetBeans 6.8”

  1. Netbeans is a good IDE for Symfony development says:

    […] agree with this: Netbeans is a good IDE for Symfony development. I think this is especially true if you, like me, also develop with JVM languages. This last year I […]

  2. Closer To The Ideal » Blog Archive » Netbeans is a good IDE for Symfony says:

    […] agree with this: Netbeans is a good IDE for Symfony development. I think this is especially true if you, like me, also develop with JVM languages. This last year I […]

  3. pontorez.myopenid.com/ says:

    Thanks for the useful info. Works fine with latest version of Symfony (1.4). Unfortunately NetBeans is a little monstrous too. Yes PHP version of NetBeans occupies 25 Mb but it requires Java Development kit (74 Mb).

  4. FractalizeR says:

    Yes, it does. But I think this is not a big problem. I already have it installed on my PC.

  5. clod says:

    I suggest to look at the free PHP IDE Codelobster PHP Edition with special plug-in for Symfony framework: http://www.codelobster.com/symfony.html

Leave a Reply

You must be logged in to post a comment. Login now.