An Oracle blog about NetBeans for PHP

Composer support

Hi all, today we would like to introduce you our Composer support which will be present in NetBeans 7.3. If anyone of you does not know Composer yet, please be informed that:

"Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you."

So, what support do we have in NetBeans? The first step, as usually, is to open the Composer IDE Options panel:

Composer NetBeans IDE Options

Once it is configured properly, it is time to create composer.json file where we can define dependencies (libraries) of our PHP project:

Create composer.json file

The generated file is opened so we can review it and add any libraries: 

Generated composer.json

Now, you are ready to install, update or validate library dependencies of your PHP project:

Validation of composer.json

We hope that you enjoy this initial support and that we will be able to improve it in the next version of NetBeans. 

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 Composer).

Join the discussion

Comments ( 11 )
  • umpirsky Tuesday, October 23, 2012

    Great news!

    What would also be useful is composer require support.

  • umpirsky Monday, November 5, 2012

    I just noticed that composer does not install ''dev deps. If you are using IDE for composer install, you probably want dev dependencies, so it should run composer.phar install --dev

  • Tomas Mysik Monday, November 5, 2012

    To umpirsky: I will have a look at it, thanks.

  • Tomas Mysik Monday, November 5, 2012

    To umpirsky & others: reported here [1] but closed as incomplete - we need more info what the ideal state should be sp please reopen this issue and provide your comments otherwise it will not be changed/fixed.


    [1] http://netbeans.org/bugzilla/show_bug.cgi?id=221460

  • GaryJ Sunday, December 2, 2012

    How about support for 'composer dumpautoload'?

  • Tomas Mysik Monday, December 3, 2012

    To GaryJ: Please, submit an issue. Thanks.

  • GaryJ Monday, December 3, 2012

    I shouldn't need to create a new account just to submit an issue. I've made my suggestion, you've seen it, and as it's so related to the blog post, I'm surprised it's not been considered before, and either dismissed, or an existing developer within the community has not submitted their own issue.

  • Tomas Mysik Tuesday, December 4, 2012

    To GaryJ: In NetBeans, we use Bugzilla for reporting bugs and enhancements, not any blogs, sorry (it would not be possible to watch so many blogs). So, if you found a bug or enhancement and want to help, please report it. Please notice that you are the only right person to do it - you have found it, you know the arguments, use case, steps to reproduce...


  • guest Sunday, June 30, 2013

    obviously GariJ doesn't care enough

  • Pep Wednesday, April 23, 2014

    Hi Thomas

    I am trying ti install composer on my machine but I keep getting the error below:


    The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy

    I have made sure all proxy details are set but still I get this error. I would so much appreciate if you could help me. Thanks

  • Tomas Mysik Thursday, April 24, 2014

    To Pep: Likely some problem with your proxy? No idea, sorry.

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