Skip to content

NetBeans for PHP weblog
Syndicate content
About NetBeans PHP support
Updated: 10 hours 32 min ago

Doctrine2 support added

Mon, 01/30/2012 - 14:52

Hi  all, today we would like to inform all the Doctrine2 PHP ORM framework users that their favorite framework is now supported in NetBeans.

First, as always, be sure that NetBeans knows about your Doctrine2 installation:

Docrtine2 IDE Options

If you have installed Doctrine2 via PEAR, the Doctrine2 script will be detected automatically.

Next, you need to tell NetBeans that your existing PHP project uses Doctrine2 - open Project Properties dialog and enable its support.

Enable support for Docrine2

Now, you will be able to run Doctrine2 commands right from the IDE. Please notice that the project now has a Doctrine2 badge icon.

Run Doctrine2 Command

All the possible Doctrine2 commands will appear.

Doctrine2 Commands

They can be run the same way as for the other supported frameworks. It means also that the output of the invoked command will be available in the Output window.

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


Categories: Open Source

Identical Comparison Hint

Tue, 01/24/2012 - 16:18

Hi everybody! Today we would like to introduce you some of our new hints. This one is called Identical Comparisons and checks whether you use more strict identical comparison instead of simple equal comparison. If not it suggests you to change it to identical one.

If you don't know what is the difference between identical and equal comparisons, you can read it in official PHP manual.

And because we know, that sometimes there is a use case when you should use just equal comparison, this hint is row sensitive. It means that well known hint bulb will appear only if you are on the row with comparison. So no yellow warning triangle will scream on you ;) This hint just wants to help you :)

But there is just another advantage of this hint. It can change your "==" sign to "===" as you certainly expected, but it can detect the type of the right hand side variable and make a type cast for you too!

Identical Comparisons

That's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (component php, subcomponent Editor). Thanks.

Categories: Open Source

PHP 5.4 Support: Array Dereferencing

Thu, 01/19/2012 - 04:07

Hi all! As I wrote in my last blog post, this year is the year of PHP 5.4. Last PHP 5.4 RC is comming and stable version should be relased soon, so we would like to introduce you some of our PHP 5.4 editor features.

Note: All PHP 5.4 features are available in your projects after setting Project Properties -> Sources -> PHP Version to PHP 5.4 value, or after choosing the same value during a PHP Project creation (in New Project Wizard).

Today we would like to talk about array dereferencing. If you don't know, what does it mean, you can just read an official RFC.

And here it is. This is how it looks like in NetBeans PHP Editor. No syntax errors and working code completion.

 Array Dereferencing

That's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (component php, subcomponent Editor). Thanks.

Categories: Open Source

Symfony2 and Twig part of NetBeans

Tue, 01/17/2012 - 10:03

Hi all, let me inform you that our support for Symfony2 framework and Twig templates (donated by Sebastian Hörl) are now part of standard NetBeans PHP distributions. More details about these features can be found in our previous blog post.

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 Symfony or Twig).

Categories: Open Source

ApiGen support added

Thu, 01/12/2012 - 07:55

Hi all, today we would like to show you how you can generate very nice API documentation of your projects with ApiGen.

Citation from http://apigen.org/:
ApiGen is the tool for creating professional API documentation from PHP source code, similar to discontinued phpDocumentor/phpDoc.

It works the same way as the current PhpDoc support. So, please install it and just verify in Tools > Options > PHP > ApiGen that NetBeans is able to detect it correctly (this should work for PEAR installation); if not, simply select the ApiGen script manually using the Browse button:

ApiGen IDE Options

Next, verify that ApiGen properties of your project are also correct:

ApiGen Project Properties

As you can see, a configuration file can be provided. This configuration file is in the Neon format, which NetBeans supports as well.

If everything is as you wish, just generate the API documentation:

Generate documentation via ApiGen

NetBeans will inform you about the progress in the Output Window:

ApiGen in work

If the process is successful, your WWW browser is opened with the generated documentation:

Generated Documentation

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

Categories: Open Source

Initial Support for Neon File Type

Tue, 01/10/2012 - 08:40

Hi all in the year of PHP 5.4! Today, we would like to introduce you our support for a new file type. It's called NEON and it's a kind of configuration file developed by the Nette Foundation (authors of the Nette Framework). All of you surely know INI, or YAML files, so NEON is something similar.

You can find more information about this file type (its syntax, differences between NEON and YAML, etc.) on its official web site.

So from now, we can recognize these files and we know how to color them (as you can see below). Isn't that nice?

Neon Syntax Coloring

And why we decided to support this file type? Because it's used by some other tools which we'll support too ;) (stay tuned!)

That's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (component php, subcomponent Neon files). Thanks.

Categories: Open Source