NetBeans for PHP (Comments)https://blogs.oracle.com/netbeansphp/feed/comments/atom2015-02-23T12:17:38+00:00Apache Rollerhttps://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1407248259230Re: Nette Tester support addedTomas Mysik2014-08-05T14:17:39+00:002014-08-05T14:17:39+00:00
<p>To Bob:</p>
<p>&gt; This restriction is from a conceptual and functionality perspective not useful.</p>
<p>Not true. It follows PHPUnit conventions.</p>
<p>&gt; Without this restrictions, Netbeans actually does fully support Codeception as you can choose your own phpunit runfile.</p>
<p>So, you are using existing *PHPUnit* support for running some *other* tool, right?</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1407248011240Re: Nette Tester support addedBob2014-08-05T14:13:31+00:002014-08-05T14:13:31+00:00
<p>is it possible to remove restrictions for the 'run focused test method'?</p>
<p>Currently, it does not work when:<br/>
* a file is not ending with Test <br/>
* and when a method does not start with test</p>
<p>This restriction is from a conceptual and functionality perspective not useful. Without this restrictions, Netbeans actually does fully support Codeception as you can choose your own phpunit runfile.</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1407243304836Re: Nette Tester support addedTomas Mysik2014-08-05T12:55:04+00:002014-08-05T12:55:04+00:00
<p>To Bob: Codeception is simply not supported by NetBeans right now, sorry. Feel free to submit a new enhancement for it.</p>
<p>Thanks.</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1407243134715Re: Nette Tester support addedBob2014-08-05T12:52:14+00:002014-08-05T12:52:14+00:00
<p>Hi Tomas,</p>
<p>I want to point out that support for Codeception if very important for the php-community. One thing that is lacking, is the support for enabling different File names. Now it is restricted to *Test.</p>
<p>That means I cannot use 'run focused testmethod' in a *Cest class. This restriction I dont understand, as it does not seem useful.</p>
https://blogs.oracle.com/netbeansphp/entry/composer_support#comment-1398319846152Re: Composer supportTomas Mysik2014-04-24T06:10:46+00:002014-04-24T06:10:46+00:00
<p>To Pep: Likely some problem with your proxy? No idea, sorry.</p>
https://blogs.oracle.com/netbeansphp/entry/composer_support#comment-1398268292110Re: Composer supportPep2014-04-23T15:51:32+00:002014-04-23T15:51:32+00:00
<p>Hi Thomas </p>
<p>I am trying ti install composer on my machine but I keep getting the error below:<br/>
[Composer\Downloader\TransportException] <br/>
The &quot;<a href="https://getcomposer.org/version&quot;" rel="nofollow">https://getcomposer.org/version&quot;</a> file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy </p>
<p>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 </p>
https://blogs.oracle.com/netbeansphp/entry/improve_your_code_with_new#comment-1397980978321Re: Improve Your Code With New Hintsguest2014-04-20T08:02:58+00:002014-04-20T08:02:58+00:00
<p>I'd like to second the request for a simple ability to suppress a hint. That would be far more useful than questionable hints such as line counts (sometimes, it just does make sense to have a lot of lines in one place, and I can see by looking how large a class/method is). The example given above is rather artificial, so here is another. Suppose an abstract class that wants to allow subclasses to do extra processing when a particular situation arises. The abstract class has a method</p>
<p>protected function special ($foo) {}</p>
<p>which the subclasses can override. It is called by method(s) in the abstract class. If a subclass does not want to process the special situation, it doesn't override the method. The abstract class doesn't want to use an abstract method, because then all the subclasses would be forced to implement the method, even if empty, adding unnecessary clutter. But the method in the abstract class generates a hint ($foo is unused) that is liable to hide genuinely useful hints. And I really don't want to write $foo = $foo; just to make Netbeans happy - that's surely not the way to good coding.</p>
https://blogs.oracle.com/netbeansphp/entry/new_javascript_editor#comment-1396888572655Re: New JavaScript Editorguest2014-04-07T16:36:12+00:002014-04-07T16:36:12+00:00
<p>Hi, not understand, I used 7.4, now trying to use 8.0 in my project, stop working &quot;syntax validation&quot; for JavaScript, how to correct this?</p>
https://blogs.oracle.com/netbeansphp/entry/path_mapping_in_php_debugger#comment-1396382342406Re: Path Mapping In PHP Debuggerguest2014-04-01T19:59:02+00:002014-04-01T19:59:02+00:00
<p>I can't understand this yet.</p>
<p>In my php web project, I have an index.php file which is called for every url, using mod_rewrite, </p>
<p>so if the url is website.com/customers/view/123, the index.php file is called, and inside that it detects the url and calls a function named &quot;view_single&quot; in the class named &quot;customers&quot;.</p>
<p>I put a breakpoint in that function in that class file, and expecting it to pause execution so I can examine variables, but it does not stop at the breakpoint. </p>
<p>I am specifying the url to debug in NB IDE as <br/>
<a href="http://website.com/customers/view/123?XDEBUG_IDEKEY=netbeans-xdebug" rel="nofollow">http://website.com/customers/view/123?XDEBUG_IDEKEY=netbeans-xdebug</a> and the NB IDE says xdebug is running.</p>
<p>If I put a breakpoint in the index.php file, it does stop, but it does not help when debugging class methods.</p>
<p>As a last resort, I can insert the command xdebug_break(); in the line in my class method and it will stop, but this is not ideal.</p>
<p>Am I not understanding how a path mapping should be used in this scenario?</p>
https://blogs.oracle.com/netbeansphp/entry/improve_your_code_with_new#comment-1396337949745Re: Improve Your Code With New Hintsguest2014-04-01T07:39:09+00:002014-04-01T07:39:09+00:00
<p>Error suppression is not always evil. Sometimes it's perfectly reasonable, especially when applied to a simple variable. The only error that can arise through referring to a simple variable is that it is unset, so preceding it with the at sign recognises that there are good reasons why the variable may not be set and that null is acceptable. For example, suppose a loop that conditionally sets array elements, but may not always set any element, resulting in the array being unset, and assume the processing is in a method that returns the array. This is neatly achieved by return (array) @$resultarray; and gives the desirable degenerate case of an empty array.</p>
https://blogs.oracle.com/netbeansphp/entry/improve_your_code_with_new#comment-1396337646740Re: Improve Your Code With New Hintsguest2014-04-01T07:34:06+00:002014-04-01T07:34:06+00:00
<p>It's rather unhelpful to flag references to dollar_SERVER as requiring filtering. Many of the fields provided do not ever need filtering.</p>
https://blogs.oracle.com/netbeansphp/entry/removing_trailing_spaces#comment-1396021679552Re: Removing Trailing Spacesguest2014-03-28T15:47:59+00:002014-03-28T15:47:59+00:00
<p>I dont't understand why NetBeans doesn't have the option to remove trailing spaces of the line where the caret is on save. Eclipse has that option a long time.</p>
https://blogs.oracle.com/netbeansphp/entry/how_to_fix_your_use#comment-1395836141948Re: How To Fix Your Use Statements?Mariusz2014-03-26T12:15:41+00:002014-03-26T12:15:41+00:00
<p>Hi,</p>
<p>I'm refactoring my app by adding namespaces instead of long_class_names. I've got a lot of PHP files (hundreds). How to automatically add &quot;use&quot; statements to every file in a project (when suitable of course) when I add the &quot;namespace&quot; keyword to a file with a class?</p>
<p>Thanks.</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_is_out#comment-1395814491345Re: NetBeans 8.0 is out!Tomas Mysik2014-03-26T06:14:51+00:002014-03-26T06:14:51+00:00
<p>To guest: I have the same problem :)</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_is_out#comment-1395780791770Re: NetBeans 8.0 is out!Pies2014-03-25T20:53:11+00:002014-03-25T20:53:11+00:00
<p>I think the problem is with the &quot;Preview&quot; functionality.</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_is_out#comment-1395780748634Re: NetBeans 8.0 is out!guest2014-03-25T20:52:28+00:002014-03-25T20:52:28+00:00
<p>Where should I report the problem with this blog not saving my nick? :) I'll do that, thanks.</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_is_out#comment-1395741800569Re: NetBeans 8.0 is out!Tomas Mysik2014-03-25T10:03:20+00:002014-03-25T10:03:20+00:00
<p>To guest: Please, for reporting issues use NB Bugzilla (link is in the blog post), not this blog.</p>
<p>Thanks.</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_is_out#comment-1395741305498Re: NetBeans 8.0 is out!guest2014-03-25T09:55:05+00:002014-03-25T09:55:05+00:00
<p>I think there is a problem when generating JavaDoc comments and fixing imports if I have aliased classes. For example, I have a class:</p>
<p>namespace foo\bar;</p>
<p>use baz\SomeClass as SomeClassAlias;</p>
<p>class Test {<br/>
public function getSomething(SomeClassAlias $someClass) {<br/>
}<br/>
}</p>
<p>Now, when I generate a method comment (by writing /** before it and pressing Enter) it generates</p>
<p>/**<br/>
* @param \baz\SomeClass $someClass<br/>
*/</p>
<p>Then, when I press ctrl+shift+I to fix uses it changes it into:</p>
<p>/**<br/>
* @param SomeClass $someClass<br/>
*/</p>
<p>and changes my use statements to:</p>
<p>use baz\SomeClass;<br/>
use baz\SomeClass as SomeClassAlias;</p>
<p>I.e. instead of using my alias, it uses the original class name and adds an extra use statement, which is very annoying and potentially dangerous. Any tips?</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_rc1_is#comment-1395243339248Re: NetBeans 8.0 RC1 is out!guest2014-03-19T15:35:39+00:002014-03-19T15:35:39+00:00
<p>Issue resolved. Strange behavior caused because NB app was maximized; when un-maximized, menus behave normally.</p>
https://blogs.oracle.com/netbeansphp/entry/netbeans_8_0_rc1_is#comment-1395193783610Re: NetBeans 8.0 RC1 is out!guest2014-03-19T01:49:43+00:002014-03-19T01:49:43+00:00
<p>Just installed Version 8.0 on Linux Mint 13 Maya (LTS) and wanted to report that one must hold down the left mouse button to keep menu drop-downs open. This seems like strange behavior. Am I missing something?</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1394099294504Re: Nette Tester support addedAparna Basu2014-03-06T09:48:14+00:002014-03-06T09:48:14+00:00
<p>Am I to understand that this IS a bug: what a waste of time!</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1394097389185Re: Nette Tester support addedTomas Mysik2014-03-06T09:16:29+00:002014-03-06T09:16:29+00:00
<p>To Aparna Basu: Please, do NOT send any private e-mails. As written in the blog post, use NetBeans Bugzilla (the link is there as well) if you find any problem/issue.</p>
<p>Thanks.</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1394096798709Re: Nette Tester support addedAparna Basu2014-03-06T09:06:38+00:002014-03-06T09:06:38+00:00
<p>Tomas: Hope, you can reach the dropbox URL.</p>
<p>Earlier message:<br/>
Cannot attach screenshot: sending email to Petr.Pisl@Oracle.COM: just an observation, it looks like the sender and writer of the email are different. Could you respond to the specific problem?</p>
<p>Thanks for your prompt response though I am in a hurry to move on due to project constraint.</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1394094633407Re: Nette Tester support addedTomas Mysik2014-03-06T08:30:33+00:002014-03-06T08:30:33+00:00
<p>To Aparna Basu: The simplest way to start with Nette Tester is likely to create a new PHP Sample project - Calculator with Nette Tester (simply invoke the New project wizard and choose this sample from Samples &gt; PHP)</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1394092285968Re: Nette Tester support addedAparna Basu2014-03-06T07:51:25+00:002014-03-06T07:51:25+00:00
<p>Can you give a comprehensive - end to end - detail with an example? It should provide sufficient information on configuring nette/tester for NB8*; (if possible, also doing the same for composer since its diagnosis often shows errors); a sample class; a sample test class; necessary steps to run the same.</p>
<p>I followed the above description and ran into the following problem.<br/>
(1) I created composer.json (init)<br/>
(2) I I rand composer to add dependency of bette/tester.<br/>
(3) I used the example of <a href="https://github.com/nette/tester:" rel="nofollow">https://github.com/nette/tester:</a> (i) created a project, (ii) created a 'test' directory and placed the class and test class files in the source and test directories, respectively.<br/>
(4) Followed the above steps in two ways: (i) exactly as mentioned, and (ii) using the test dir in the above step.</p>
<p>Still when I ran the 'test' (ctrl + F6), I inevitably get the diagnosis as 'no tests executed (0.0s). What should I do?</p>
<p>An early response will be appreciated. Thanks,</p>
<p>Aparna Basu<br/>
P.S. For some reasons, I am getting 'Comment authentication failed' error repeatedly.</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1394017683271Re: Nette Tester support addedWiseo2014-03-05T11:08:03+00:002014-03-05T11:08:03+00:00
<p>Thanks for the repost John,really appreciate it! <br/>
Best regards, keep up the good work!</p>
https://blogs.oracle.com/netbeansphp/entry/improve_your_code_with_new#comment-1392977832870Re: Improve Your Code With New Hintsguest2014-02-21T10:17:12+00:002014-02-21T10:17:12+00:00
<p>Thanks for these hints, I generally find them helpful.<br/>
Just a small criticism on a couple of them where I think more careful use of English would be appropriate:-<br/>
It says here 'Please, don't forget, that all hints are just our suggestions'. If this is true then it is not good English to use words in the Hints like &quot;Must&quot;, &quot;Allowed&quot; or &quot;Do not&quot;, which imply that the code won't work: (&quot;If-Else Statements Must Use Braces&quot;, &quot;Method Length Is 11 Lines (10 allowed)&quot;, &quot;Do Not Access Superglobals...&quot;). This is very confusing. Better English would be &quot;Should&quot;, &quot;Recommended&quot;, &quot;Should not&quot;, or &quot;Preferred&quot;, &quot;Suggested&quot;, etc.<br/>
Thanks again, and keep up the good work!</p>
https://blogs.oracle.com/netbeansphp/entry/hint_implement_all_abstract_methods#comment-1392285462314Re: Hint: Implement all abstract methodsNick2014-02-13T09:57:42+00:002014-02-13T09:57:42+00:00
<p>Using Netbeans 7.4, this feature is really useful:<br/>
Menu -&gt; source -&gt; insert code, Choose &quot;override &amp; implement&quot; method </p>
<p>However, is it also possible to display information this as a separate window? When developing and maintaining a large set of PHP code, I need to see what methods have been inherited from the extended class.</p>
<p>Thanks. Keep up the good work :-)</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1392123976591Re: Nette Tester support addedTomas Mysik2014-02-11T13:06:16+00:002014-02-11T13:06:16+00:00
<p>To John: Thanks for your report!</p>
https://blogs.oracle.com/netbeansphp/entry/nette_tester_support_added#comment-1392117323767Re: Nette Tester support addedJohn2014-02-11T11:15:23+00:002014-02-11T11:15:23+00:00
<p><a href="https://netbeans.org/bugzilla/show_bug.cgi?id=235354" rel="nofollow">https://netbeans.org/bugzilla/show_bug.cgi?id=235354</a></p>