Ressources documentaires pour Mandriva Linux et les Logiciels Libres

Netbeans : my new PHP IDE of choice

During a longPHP support dans Netbeans time my PHP development of choice was http://www.eclipse.org/ and the PHP plugin for Eclipse : http://www.phpeclipse.com/. Please note that there’s another PHP plugin for Eclipse developped by Zend and IBM : http://www.eclipse.org/pdt/ also known as the PHP Development Project. However I was mostly using Eclipse and phpeclipse as it was the first PHP plugin I used, and I did appreciate the native integration of CVS and team management tools.

However tonight I decide to give a try to Netbeans with PHP support. What can I say ? I just fall in love. Whereas I have to be used to the new syntax highlighting, PHP support in Netbeans is top for several reasons :

  • Netbeans seems to start faster than Eclipse and can also import Eclipse projects,
  • it support project creation from Zend or Symphony frameworks ( even if I don’t use them ),
  • it supports natively and easily PHP debugging ( with xdebug ) and PHPUnit/Selenium tests,
  • It allows Code Coverage,
  • It correctly support and parsed my CSS files or .sql files,
  • Even better … It allows to connect to your database, view its schema, table structures, and of course execute queries and test your migration SQL scripts,
  • it allows to search through a plugin directly in the PHP manual
  • it can dynamically parsed and handle your PHPDoc tags and then present your PHP file structure with the PHPDoc you add : this is a good insensitive to write correct PHPDoc,
  • Last but not least it provides native CVS and Mercurial integration

In only a few clicks I add way more features than with Eclipse and PHPEclipse. Whereas it’s possible to add xdebug support to eclipse and phpeclipse, the process is not automatic and can be somewhat hard. So finally I switched to Netbeans for my PHP dev. The procedure is very straightforward under Mandriva 2010 Spring as Netbeans packages is already available. Here is the procedure, under Mandriva 2010 Spring, to install Netbeans with a useful and complete PHP development environment :

  1. install the Netbeans 6.8 and its related packages with urpmi : [bash light= »yes »]urpmi netbeans[/bash]
  2. install PHPUnit, xdebug and Selenium : [bash light= »yes »]urpmi php-pear-PHPUnit php-xdebug php-pear-Testing_Selenium[/bash]
  3. restart Apache to activate the PHP extensions : [bash light= »yes »]service httpd restart[/bash]
  4. Now start Netbeans from the menu : Application -> Development -> Development Environment -> Netbeans IDE 6.8
  5. Once Netbeans have started, deline if you wish the registration, and then select on the right pane « Install Plugins« . Here is the list of plugins I did choose for my PHP development : Database, PHP, Php Manual Search, Selenium module for PHP. Installing plugins is very easy, just select them, and then follow the instructions ( most of the time hiting Next or validating a License ). Don’t forget to accept Php Manual and thus even if the plugin is considered as not trusted.
  6. Once your plugins have been installed, restart Netbeans. You may want to decline sending informations about you to Netbeans team.

Now you can import your old Eclipse projects, or if as me you are using a control version system, just checkout your repository ( Team -> CVS -> Checkout ). Mercurial and subversion are supported. For those willing to have Git support, they should have a look at the third party plugin : Netbeans Git Plugin ( homepage : Netbeans Git Module ). To add third parties plugins, download them as .nbm file, then install them with Tools -> Plugins -> [Downloaded] tab -> Add Plugins.

There’s one big caveat however :  Netbeans internal SSH client doesn’t support key authentification. You will have to use password authentification, or create a SSH tunnel. For further informations see http://wiki.netbeans.org/FaqHowToSetUpSSHAuth.

And now happy PHP coding with Netbeans 🙂

Similar posts

1 Commentaire

  1. 21/09/2010    

    You cannot unfortuantely Import Eclipse PHP projects. The Eclipse PHP projects are listed in the Netbeans Importer with a (unknown project type) after the names and cannot be selected for import.

  1. Tweets that mention Netbeans : my new PHP IDE of choice -- Topsy.com on 13/07/2010 at 07:11

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Catégories

My Tweets