An Oracle blog about NetBeans for PHP

Phing support added

Hi all, today we will show you our support for PHP project build system or build tool which has been added in NetBeans 8.1. This time, we will talk about Phing.

This support works exactly the same way as the existing support for JavaScript build tool, Grunt (please note that for NetBeans 8.1, we have added another popular JavaScript build tool, Gulp). This starts with configuration of Phing executable, of course:

Phing executable configuration

Now, we can create a new Phing build file if it does not exist in the PHP project yet: 

Phing build.xml template

Phing build file appears among Important Files of the project:

build.xml is Important File

Phing targets can be assigned to common IDE actions in the Project Properties dialog so then, if one e.g. Runs Project, the relevant Phing target is automatically executed as well.

Project Properties of Phing

Any Phing target defined in project's build.xml can be run via project's context menu. One can even specify an advanced task:

Advanced Phing target

Advanced task can be configured with custom options and parameters. Moreover, more Phing targets can be run at once and every advanced task can be optionally stored in VCS so every team member can use it easily:

Advanced Phing target configuration

NetBeans remembers a few of the latest advanced tasks and allows to rerun them easily. Ordinary Phing targets can be run directly as well, of course:

Stored advanced Phing target

Output of every Phing target run can be easily found (and reviewed if needed) in the Output window: 

Phing output

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 Phing). You can also leave a comment here (please notice that the comments are moderated so they will not appear here immediately) but reporting issues is strongly preferred.

Join the discussion

Comments ( 10 )
  • guest Tuesday, June 2, 2015

    I'm new in NetBeans for PHP but i already know Phing for some time. Why its support has been added only now?

  • Tomas Mysik Wednesday, June 3, 2015

    @guest: Not sure what you mean exactly, sorry.

  • Jan Sunday, June 14, 2015

    Will 8.1 add support for the most popular PHP framework of this moment (2015):

    Laravel with (Blade templates)

  • Tomas Mysik Monday, June 15, 2015

    @jan: No plans for any framework support, sorry.

  • kenguest Tuesday, June 23, 2015

    How does this differ from using the PhingKing plugin?

  • Tomas Mysik Tuesday, June 23, 2015

    @kenguest: No idea about the PhingKing plugin so sorry :) Feel free to try the development version of NetBeans and report all the issues and enhancement you find to NetBeans Bugzilla.


  • Bob Wednesday, July 1, 2015

    hi Tomas,

    the phing module is excellent and I have been waiting for it for a long time.

    You are asking about any enhancements:

    Its nice to see that you can add as many Phing targets as you want, but these cannot be connected to the Keymap. Perhabs hard to realize. As an alternative, if its possible, I would see a few extra default IDE actions added (just like you did with Clean project):

    - GIT commit project

    - GIT push project

    - Stage project

    - Launch project

    - Composer update

    - Profile project

  • Tomas Mysik Thursday, July 2, 2015

    @Bob: As written in the blog post, please, use NetBeans Bugzilla and not these comments. Thanks!

  • PyRowMan Tuesday, September 8, 2015

    Hi guys, I wanted to know if it was possible to make a build on save to modify the targeted file in a php project ?

  • Tomas Mysik Tuesday, September 8, 2015

    @PyRowMan: Unfortunately not possible now. But it is already reported as an enhancement.


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