Initial Symfony support

Today, I would like to inform you that we have added initial support for the popular PHP framework - Symfony (the most voted issue in NetBeans IssueZilla).

Please notice that the support is still quite minimal and we would like to improve it a lot, there are still many things to do. So, let's have a look what's available right now.

Existing Symfony projects should be recognized automatically but of course, one can create a new PHP project with Symfony framework:

New PHP projectwith Symfony framework

The main support now is the possibility to run Symfony commands:

Run Symfony Command

The UI for the commands allows to:

  • filter the Symfony commands (1),
  • specify command parameters (2),
  • select a command (3),
  • see help of a command (4) and
  • preview the whole command that will be run (5).

UI for Symfony Commands

Please notice that the list of commands is project specific, it means that if one uses e.g. Doctrine instead of Propel, no Propel commands are listed, just the Doctrine ones. Also, all the commands from project's Symfony plugins should be available.

Of course, the output of the currently running command is displayed in the Output window, directly in the IDE.

Output of Symfony Command

UPDATE:

It could be useful that one can specify shortcuts for Symfony actions.

NetBeans Keymap

The Symfony script should be detected automatically but it can happen that it's not found so one can specify it in the IDE Options.

Symfony Options

That's all for today, now it's your turn so please, test it and report all the issues or enhancements you find in NetBeans IssueZilla (component php, subcomponent symfony).

Thanks a lot and happy Symfony coding!


Comments:

Is 'run command' functionality implemented as console wrapper? Are allowed commands list and path hardcoded? If no, it's possibly to extend it to run virtually anything this way: framework consoles, phing, custom php files.

Posted by Sam on July 06, 2009 at 05:41 AM CEST #

Great to hear that, it'll greatly increase work speed. Thank you, Netbeans Team!

Posted by Leszczu on July 06, 2009 at 06:55 AM CEST #

Such a great news, I can hardly believe that it's monday! :)

Posted by e.s.t on July 06, 2009 at 07:35 AM CEST #

That's fantastic! I can not wait to see what the future holds for NB.

Posted by Rob on July 06, 2009 at 07:39 AM CEST #

Great! Now i would like to see Zend Framework too :D

Posted by Markus F on July 06, 2009 at 09:15 AM CEST #

"Unknown version of Symfony script detectd, support might not work"

:(

Posted by _imc_ on July 06, 2009 at 10:26 AM CEST #

I will wait for Yii framework support

Posted by Skyblaze on July 06, 2009 at 11:15 AM CEST #

Great news! Thank you very very much!

Posted by Ben Haines on July 06, 2009 at 12:56 PM CEST #

Looks promising. I do think that the Symfony script option should be project bound, one might use different versions of Symfony for different projects.

Posted by Marijn Huizendveld on July 06, 2009 at 05:16 PM CEST #

When will netbeans support Zend Framework?

Posted by qingyue on July 06, 2009 at 07:07 PM CEST #

To Sam:
Sorry, I don't understand exactly what you want to achieve. Could you be more specific please?

Thanks,
Tomas

Posted by Tomas Mysik on July 07, 2009 at 03:19 AM CEST #

To Markus:
What exact support for Zend framework do you mean? Could you please update issue 146028:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=146028

The difference is that ZF does not use command line (or am I wrong)? So if you put ZF on your PHP Include Path, code completion should work. Or do you mean anything else?

Thanks,
Tomas

Posted by Tomas Mysik on July 07, 2009 at 03:22 AM CEST #

To _imc_:
Is this your case as well?
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=168211

Or do you mean anything else?

Thanks,
Tomas

Posted by Tomas Mysik on July 07, 2009 at 03:24 AM CEST #

To Marijn Huizendveld:
Yes, this is planned.

Thanks,
Tomas

Posted by Tomas Mysik on July 07, 2009 at 03:25 AM CEST #

Nice, I really think this is required to make it useful for the group of developers that work on numerous projects.

Posted by @Tomas Mysik by Marijn Huizendveld on July 07, 2009 at 04:59 AM CEST #

Hello,

I'm using this on Linux and Mac. And there I have two different problems:

On Linux I have the same problem as _imc_. I use the 1.2.7 version. So the issue is not same for me...

On my Mac he told me, that there is no pgsql support. But when I use the Command Line everyting works fine.

Hope somebody can help mne with this problems.

Thanks
Stefan

Posted by Stefan on July 07, 2009 at 11:03 AM CEST #

Really interesting, and a big help, just one question, this initial support is available in NB6.7 or only in NB7 ?

Posted by Gabriel on July 07, 2009 at 11:04 AM CEST #

Under Windows XP Pro SP2 when you pointing the location of symfony script you must point a file (folders aren't allowed). For symfony-1.2.7 instalation (not sandbox) you need to point file '.\\lib\\vendor\\symfony\\data\\bin\\symfony.bat' (when you choose 'symfony' file there will be problems with recognizing framework version so you will not be able to create new symfony project.

Here is link to the build of netbeans 6.7 supporting symfony:
http://bits.netbeans.org/download/trunk/nightly/2009-07-07_14-00-37/

Posted by Kamil Ż. on July 07, 2009 at 06:59 PM CEST #

To Marijn Huizendveld:
I have a prototype, you can progress here:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=168212

Tomas

Posted by Tomas Mysik on July 08, 2009 at 02:31 AM CEST #

To Stefan:
Please, as written in blog post, submit a bug report otherwise we are not able to help you.
(Likely only for your Linux problem, the other is likely problem with your installation; you can ask for help on our PHP users mailing list [1])

Thanks,
Tomas
[1] http://www.netbeans.org/community/lists/top.html

Posted by Tomas Mysik on July 08, 2009 at 02:34 AM CEST #

To Gabriel:
As written in the blog post, only in development version of NetBeans. The next milestone will include this support, of course.

Tomas

Posted by Tomas Mysik on July 08, 2009 at 02:37 AM CEST #

To Kamil Ż:
I'm working on it, it will be solved as part of the issue:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=168212
(Symfony script will be run using PHP interpreter so no need to select a BAT file; I have a prototype that seems to work well, it would be great if someone on Windows could test it more; feel free to add yourself to CC of the bug).

Thanks,
Tomas

Posted by Tomas Mysik on July 08, 2009 at 02:40 AM CEST #

It is a really great news for whole symfony's community :-)

Posted by Whisller on July 08, 2009 at 03:28 AM CEST #

FYI issue
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=168212
is fixed now (for testing, use PHP Build #545 or newer).

Thanks a lot,
Tomas

Posted by Tomas Mysik on July 08, 2009 at 04:29 AM CEST #

@Tomas Mysik:
I mean it probably can be extended to support not only Symfony but consoles in general. To do this you can:
1. Allow multiple console profiles for a project.
2. Allow to specify console entry script and parameters.
3. In these parameters allow to specify commands for code complete feature that appears in console dialogue.
4. Allow to export / import profiles so people will be able to share them.

This way you'll get console support for nearly all existing frameworks in a short time. Not only Symfony.

Posted by Sam on July 08, 2009 at 04:41 AM CEST #

Hello,

I order to support better Code Completion for Symfony/Doctrine is it possilbe to support this:
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.method.pkg.html
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.property.pkg.html

I found something about this here:
http://forum.symfony-project.org/index.php/m/75342/?srch=IDE#msg_75342

Thanks and Greetings,
Stefan

Posted by Urkman on July 08, 2009 at 05:00 AM CEST #

To Sam:
It's not so easy - there's still a need to have some code in Java (so it means you have to create an NB module). But, as you say, "console support" is in general part so it should be quite easy to implement other frameworks that work in similar way.

Tomas

Posted by Tomas Mysik on July 08, 2009 at 05:43 AM CEST #

To Urkman:
@property is already supported (search our blog), not sure about @method. I will submit a bug report.

Thanks,
Tomas

Posted by Tomas Mysik on July 08, 2009 at 05:45 AM CEST #

To Mysik:
Thanks for that. I just tested "@method" and it seems not to be included.

Stefan

Posted by Urkman on July 08, 2009 at 06:40 AM CEST #

Hello,

Would it be possible to create some kind of mechanism for extending/overriding type recognition?

So, this could work:

// $table has type Some_Table or Doctrine_Table (where project doesn't contain class Some_Table)
$table = Doctrine::getTable("Some_Table"); ?

// in action (and other classes extending sfComponent) :

// $user has type myUser or other (depends on factories.yml)
$user = $this->getUser();

There are many such individual cases. Surely it would be helpful but i'm not sure if it isn't too overcomplicated.

Posted by Michal on July 08, 2009 at 06:52 AM CEST #

To Urkman:
http://www.netbeans.org/issues/show_bug.cgi?id=168277

Feel free to add yourself to CC.

Tomas

Posted by Tomas Mysik on July 08, 2009 at 07:03 AM CEST #

To Michal:
Do you mean this?
http://blogs.sun.com/netbeansphp/entry/defining_variable_type_in_a
http://blogs.sun.com/netbeansphp/entry/defining_a_variable_type_in

HTH,
Tomas

Posted by Tomas Mysik on July 08, 2009 at 07:04 AM CEST #

To Tomas:

Yeah, i know about @var comment. But with it you have to write (if you would like to have content asist for myCustomMethod) :

/\* @var $myTable MyTable \*/
$myTable = Doctrine::getTable("MyTable");
$data = $myTable->myCustomMethod();

instead of:

$data = Doctrine::getTable("MyTable")->myCustomMethod();

But as i've written this would probably require massive ammount of work (to support all cases).

Posted by Michal on July 08, 2009 at 07:32 AM CEST #

To Michal:
Sorry, I can't see any other possibility how to tell which type the variable is.
(Generics from Java would help here.)

Tomas

Posted by Tomas Mysik on July 08, 2009 at 07:35 AM CEST #

To Tomas:

What about something like that:

$data = Doctrine::/\* @var MyTable \*/getTable("MyTable")->myCustomMethod();

$user = $this->/\* @var MyUser\*/getUser()->myCustomMethod();

or:

$data = Doctrine::/\*<MyTable>\*/getTable("MyTable")->myCustomMethod();

$user = $this->/\*<MyUser>\*/getUser()->myCustomMethod();

I know it don't look well, but this is impossible(parser error):

$user = (/\*<MyUser>\*/$this->getUser())->myCustomMethod();

Posted by Michal on July 09, 2009 at 01:34 AM CEST #

To Michal:
Personally, I think that this situation is solvable using the current IDE capabilities. But this can change, feel free to file an enhancement against PHP editor.

Thanks,
Tomas

Posted by Tomas Mysik on July 09, 2009 at 02:45 AM CEST #

Very nice the tool, Im using it.
Just a problem: When you use ALT + TAB the menu is selected.
also: How do I post tickets to it???

Posted by Sid on July 09, 2009 at 07:52 AM CEST #

To Sid:
Thanks for feedback. For reporting issues use
http://www.netbeans.org/community/issues
(as written in the blog post).

Thanks,
Tomas

Posted by Tomas Mysik on July 09, 2009 at 10:49 AM CEST #

I would like use a shell console, rather than the Run command dialog.
JEdit provide a generic console for many purposes, eg. System shell command(Windows cmd/bash), ant, maven etc.

Posted by hantsy on July 13, 2009 at 09:35 AM CEST #

Great work! I've been using it, and it works like a charm, so far.. Are there any plans of giving a shortcut to switch from an action to its template and viceversa? Something like that would be great!

Posted by Nahuel on August 14, 2009 at 09:16 AM CEST #

This was always the one thing symfony sorely needed - a decent GUI admin. Fabien never really seemed to understand this aspect. Many thanks for your great efforts.

Posted by Geoff Che on September 09, 2009 at 07:54 AM CEST #

Marijn, Fabien suggests:

Since the symfony framework evolves quickly, a new stable version could very well be released only a few days after your first installation. You need to think of the framework upgrade as a major concern, and that's another reason why you should share one instance of the symfony libraries across all your symfony projects.

http://www.symfony-project.org/book/1_2/03-Running-Symfony

Posted by Fabrice on September 09, 2009 at 08:02 AM CEST #

It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.

Posted by links of london on October 29, 2009 at 08:19 PM CET #

I think that this situation is solvable using the current IDE capabilities. But this can change, feel free to file an enhancement against PHP editor.

Posted by Tiffany and Links on November 13, 2009 at 11:01 PM CET #

Please give support for CakePHP framework.

Posted by prgTW on December 11, 2009 at 05:06 PM CET #

Thank you for this greate IDE and symfony support.
i found this IDE today an im sorry that i didnt use it before.

Posted by Ehsan Chavoshi on March 05, 2010 at 01:09 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today