This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 143416 [details] Error in Netbeans Symfony2 commands no longer work. It appears to be requiring all command-line options to be filled-up. Example: generate:bundle --namespace="Foxtech/TrollBundle" ------- "/opt/lampp/bin/php" "/opt/lampp/htdocs/symfonytest/app/console" "--ansi" "generate:bundle" "--namespace=Foxtech/TrollBundle" [RuntimeException] The "dir" option must be provided. ------- It used to ask bundle names, etc. interactively, if I remember correctly. As it stands right now, the work around is to input commands from an external console (e.g. php app/console generate:bundle), which works perfectly. I also tried pasting the command generated by Netbeans in the console, and it also works. ------- "/opt/lampp/bin/php" "/opt/lampp/htdocs/symfonytest/app/console" "--ansi" "generate:bundle" Welcome to the Symfony2 bundle generator ........ ------- Environment: Netbeans 7.4 64-bit PHP 5.4.22 Symfony 2.4 Java (Oracle): 1.7.0_40 I attached a screenshot here.
It works for me without any problem in the current development version. Can you please test it? Thanks. Product Version: NetBeans IDE Dev (Build 20140102-e2bbf65912ea) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.11.0-14-generic running on amd64; UTF-8; cs_CZ (nb)
I can't test the development version right now, since the download link is going 404. http://bits.netbeans.org/download/trunk/nightly/latest/bundles/netbeans-trunk-nightly-201401020002-linux.sh I'll do give it a try when the download is fixed. Thanks ^_^
You can use our PHP build [1] (download the "NetBeans-dev-*-php.zip" file). Thanks! [1] http://deadlock.netbeans.org/job/PHP-build/
did not work for me... Product Version: NetBeans IDE Dev (Build 201401030002) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.11.0-14-generic running on amd64; UTF-8; en_US (nb) User directory: /home/mykee/.netbeans/dev Cache directory: /home/mykee/.cache/netbeans/dev "/opt/lampp/bin/php" "/opt/lampp/htdocs/sftesto/app/console" "--ansi" "generate:bundle" [RuntimeException] The "namespace" option must be provided. generate:bundle [--namespace="..."] [--dir="..."] [--bundle-name="..."] [--format="..."] [--structure] Done.
Weird... It seems like your Symfony commands are not interactive - is there a way to configure it? Could you please attach a sample project I can use to reproduce your problem? Or at least provide _exact_ steps I need to do to reproduce your problem? Simply reopen this issue, thanks.
Created attachment 143578 [details] Sample project
The steps: 1. Create a fresh Symfony2 project, you can name it anything, PHP version at 5.4 2. Right-click the project -> Symfony2 -> Run Command -> generate:bundle "/opt/lampp/bin/php" "/opt/lampp/htdocs/testproj/app/console" "--ansi" "generate:bundle" [RuntimeException] The "namespace" option must be provided. generate:bundle [--namespace="..."] [--dir="..."] [--bundle-name="..."] [--format="..."] [--structure] Done. ---------- I'll attach a sample project as well...
just to recap, it works via command-line, same project: mykee@shinratensei-lappy:~ > cd /opt/lampp/htdocs/testproj/ mykee@shinratensei-lappy:/opt/lampp/htdocs/testproj > php app/console generate:bundle Welcome to the Symfony2 bundle generator Your application code must be written in bundles. This command helps you generate them easily. --------- a copy-paste of the Netbeans generated command also makes it interactive.. I don't know of any configuration that could cause this to be non-interactive... "/opt/lampp/bin/php" "/opt/lampp/htdocs/testproj/app/console" "--ansi" "generate:bundle" Welcome to the Symfony2 bundle generator Your application code must be written in bundles. This command helps
Well, the likely cause is a "bug" in Symfony - my project uses Symfony 2.0.4 but your project has 2.4.0. Perhaps newer Symfony somehow detects interactive shell - this detection works in shell but fails in NetBeans. Not sure whether this can be fixed on NetBeans' side since Symfony has only "--no-interaction" option but no way to force interactive mode (e.g. "--interaction" option)... :/ IMHO you should submit a bug against Symfony project. I will try to investigate this issue more but as I wrote, not sure we can do anything with it in NetBeans, sorry. Thanks.
As a workaround, you can specify all the required parameters in the Run Command window but I understand that this is not user friendly...
I found it I think, in Symfony/Component/Console/Application.php, line 840: } elseif (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) { $inputStream = $this->getHelperSet()->get('dialog')->getInputStream(); if (!@posix_isatty($inputStream)) { $input->setInteractive(false); } } IMHO this cannot be fixed in NetBeans, sorry (please note that one can click in the output window, there is a caret there). Please, submit a bug against Symfony and let us know if there is anything needed in NetBeans then. I can imagine that if an env variable (e.g. "INTERACTIVE=true") is set, the interactive shell will be forced. Or, of course, a new option could be added but in such case, it would be kind of backward compatibility break since NetBeans would not work with older Symfony versions (with the env variable, this problem would not occur). Let me know if you are NOT going to submit an issue against Symfony, I will do it. Thanks.
Thanks Tomas! I think it would be better if you submit the bug report. You as the maintainer can explain the issue better. ^_^
Done, see [1]. Feel free to vote for it :) BTW as a workaround, you can comment line 843 in your Symfony/Component/Console/Application.php, it should work. Of course, you would need to repeat this step once you upgrade/install your Symfony files into your project again. Thanks for reporting. [1] https://github.com/symfony/symfony/issues/9946
Thanks! As an added note, Netbeans 7.4 in Windows works, and does not need the workaround.
Great to hear, apparently the detection in Symfony is not perfect :) Feel free to update the reported Github issue. Thanks.
@jhavlin: Jardo, could this issue be fixed in the Output window or not? Feedback from Symfony [1] is: > it seems more like a bug in netbeans to me. Is there really nothing can be done > in netbeans to make it presents its shell as an interactive one? Thanks a lot. [1] https://github.com/symfony/symfony/issues/9946
> @jhavlin: Jardo, could this issue be fixed in the Output window or not? I'm sorry, this cannot be fixed in Output Window. The processes would have to be executed in some pseudo-terminal, which seems quite complicated. Moreover, I'm not sure that Output Window should pretend to be a terminal if it is not a terminal.
@jhavlin: Thanks a lot Jardo, I have updated the Github issue.
Reopening, I will add an ENV property to NetBeans. The rest will be on Symfony guys, we cannot do more, sorry. Thanks.
Fixed. Láďo, please verify (just print_r($_SERVER) somewhere in Symfony/Component/Console/Application.php) and you should find "SHELL_INTERACTIVE" environment variable set to "true". Thanks! http://hg.netbeans.org/web-main/rev/641a1c7c5b60
I have updated the related Github issue [1] as well. Thanks. [1] https://github.com/symfony/symfony/issues/9946
BTW just to be clear - the change done in NetBeans is unfortunately not enough, Symfony itself must be improved as well.
Integrated into 'main-silver', will be available in build *201404180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/641a1c7c5b60 User: Tomas Mysik <tmysik@netbeans.org> Log: #239750 - Symfony2 commands no longer runs from Netbeans 7.4
Verified Product Version: NetBeans IDE Dev (Build 201404180001) Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Transplanted to releases repo to the branch release80. Thanks. http://hg.netbeans.org/releases/rev/19f7476e72dc http://hg.netbeans.org/releases/rev/5b346e618315
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/19f7476e72dc User: Tomas Mysik <tmysik@netbeans.org> Log: #239750 - Symfony2 commands no longer runs from Netbeans 7.4 (transplanted from 641a1c7c5b60567745e65892b1c3d6e5b85e1578)
verified in patch1 Product Version: NetBeans IDE 8.0 (Build 201403101706) Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1 Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
*** Bug 249531 has been marked as a duplicate of this bug. ***