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.

Bug 254276 - NetBeans v8.0.2 incompatible w/ latest PHPUnit version.
Summary: NetBeans v8.0.2 incompatible w/ latest PHPUnit version.
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: PHPUnit (show other bugs)
Version: 8.0.2
Hardware: All All
: P1 normal with 2 votes (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 254221 254462 254678 255365 255446 257396 257397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-11 14:33 UTC by agilis
Modified: 2016-04-25 15:39 UTC (History)
10 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description agilis 2015-08-11 14:33:13 UTC
There is an incompatibility between C:\Program Files\NetBeans 8.0.2\php\phpunit\NetBeansSuite.php and the latest version of PHPUnit, v4.8.3.

The error 'unrecognized option --run' is being thrown by the phpunit.phar due to this incompatibility.

"PHPUnit 4.8.3 by Sebastian Bergmann and contributors.

unrecognized option --run
Done."

NetBeansSuite.php is not even being executed.

After talking to the main developer, '--run' command has never been supported by PHPUnit.

Because of this incompatibility, PHPUnit v4.8.x will not work from NetBeans v8.0.2
Comment 1 iii 2015-08-12 09:49:38 UTC
Same on Netbeans 8.1 Beta
Comment 2 Law_14_14 2015-08-14 16:13:20 UTC
I have also seen this issue using PHP Unit 4.8.3 and Netbeans 8.0.2
Comment 3 kimse 2015-08-14 16:17:30 UTC
Same problem phpunit 4.7.7 works tho
Comment 4 Tomas Mysik 2015-08-17 05:58:36 UTC
Apparently a regression/wrong check of PHPUnit. We run NB test suite and pass --run parameter to it, not to PHPUnit:

"/usr/bin/php" "/home/gapon/NetBeansProjects/Calculator-PHPUnit7/vendor/bin/phpunit" "--colors" "--log-junit" "/tmp/nb-phpunit-log.xml" "--coverage-clover" "/tmp/nb-phpunit-coverage.xml" "/opt/netbeans-dev/php/phpunit/NetBeansSuite.php" "--run=/home/gapon/NetBeansProjects/Calculator-PHPUnit7/test"

Will try to change (work around) it. Is there a bug submitted against PHPUnit? I would be really curious *how* to pass parameters to your suite file...

Thanks.
Comment 5 Tomas Mysik 2015-08-17 06:36:36 UTC
(In reply to Tomas Mysik from comment #4)
> I would be really curious *how* to pass parameters to your suite file...

Found it, it should be working again. Please verify if possible.

Thanks for reporting.

http://hg.netbeans.org/web-main/rev/4bac9677cf11
Comment 6 Tomas Mysik 2015-08-17 06:45:56 UTC
*** Bug 254221 has been marked as a duplicate of this bug. ***
Comment 7 agilis 2015-08-17 13:19:08 UTC
I would like to try out the fix but unfortunately I'm not sure how to do that.
Comment 8 Quality Engineering 2015-08-18 01:18:17 UTC
Integrated into 'main-silver', will be available in build *201508180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4bac9677cf11
User: Tomas Mysik <tmysik@netbeans.org>
Log: #254276 - NetBeans v8.0.2 incompatible w/ latest PHPUnit version.
Comment 9 Tomas Mysik 2015-08-18 08:11:37 UTC
*** Bug 254462 has been marked as a duplicate of this bug. ***
Comment 10 kimse 2015-08-18 16:01:44 UTC
(In reply to Quality Engineering from comment #8)
> Integrated into 'main-silver', will be available in build *201508180002* on
> http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
> 
> Changeset: http://hg.netbeans.org/main-silver/rev/4bac9677cf11
> User: Tomas Mysik <tmysik@netbeans.org>
> Log: #254276 - NetBeans v8.0.2 incompatible w/ latest PHPUnit version.

And what does that mean ?
Comment 11 Tomas Mysik 2015-08-19 05:20:43 UTC
(In reply to kimse from comment #10)
> And what does that mean ?

Open the URL [1] and download the development build [2] (or newer). Such build contains fix of this issue.

Thanks.
[1] http://bits.netbeans.org/dev/nightly/
[2] 201508180002
Comment 12 Tomas Mysik 2015-08-25 09:05:12 UTC
*** Bug 254678 has been marked as a duplicate of this bug. ***
Comment 13 Tomas Mysik 2015-09-18 05:41:01 UTC
*** Bug 255365 has been marked as a duplicate of this bug. ***
Comment 14 Tomas Mysik 2015-09-18 06:32:25 UTC
Guys on CC, could anyone please verify this issue? It means to try the development version of NetBeans and let us know if it works or not.

Thanks.
Comment 15 Briganti 2015-09-18 06:38:12 UTC
Hi, I'm using NetBeans IDE Dev (Build 201508250002) and it's working fine.
Comment 16 Tomas Mysik 2015-09-18 06:49:44 UTC
Thanks a lot, marking as VERIFIED then.
Comment 17 Tomas Mysik 2015-09-21 13:03:37 UTC
*** Bug 255446 has been marked as a duplicate of this bug. ***
Comment 18 sruj 2015-10-24 18:11:53 UTC
sorry for stupid question, I'm newbie.

So We should use dev version of Netbeans? Is it save to use the latest dev version?
Comment 19 Tomas Mysik 2015-10-26 06:03:27 UTC
@sruj: Every issue has Target Milestone - it means the NetBeans version where the fix is present. In this case, it is 8.1 so it means that you can use NB 8.1 (RC available at the moment) and it should work.

BTW using dev version is possible as well but these versions can be broken, of source (but usually one can use them without any problem).

Thanks.
Comment 20 Tomas Mysik 2016-01-05 09:05:30 UTC
*** Bug 257396 has been marked as a duplicate of this bug. ***
Comment 21 Tomas Mysik 2016-01-05 09:05:32 UTC
*** Bug 257397 has been marked as a duplicate of this bug. ***
Comment 22 nlo22 2016-03-01 11:34:40 UTC
download the phpunit 3.7.10 hier => https://phar.phpunit.de/

worked fine
Comment 23 daniel.peder 2016-04-25 15:39:51 UTC
made a short script fixing this bug until fixed by netbeans 

https://gist.github.com/Daniel-Peder/5d21d806f3d6e989bd10c1a406e31a3f