Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x proje

General discussion on Zend Studio

Moderator: natalia_b_zend

Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x proje

Postby miracleinusa on Tue Sep 04, 2012 3:27 am

Howdy

PHPunit 3.5.15 is the highest compatible version for testing Zend Framework 1.x application. Is there any way in Zend Studio 9.0.3 which allows to set different version or different path to PHPunit?

C:\Program Files (x86)\Zend\Zend Studio 9.0.3\plugins\com.zend.php.phpunit_9.0.3.201206251721\resources\library has two folders 3.5.14 and 3.6.10
miracleinusa
 
Posts: 2
Joined: Sun Dec 18, 2011 7:22 am

Re: Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x p

Postby sebastianbeyer on Thu Sep 20, 2012 2:20 pm

I've installed pear locally and set PHPUnit Version to 3.5 with this post:

http://dustyreagan.com/downgrade-phpunit-3-6-to-3-5-15/

So I have PHPUnit 3.5 now, but am unable to execute because of this error:

Debug Error: /Applications/MAMP/bin/php/php5.3.6/lib/php/PEAR/Config.php line 650 - Uncaught exception 'PHPUnit_Framework_Error' with message 'Assigning the return value of new by reference is deprecated' in /Applications/MAMP/bin/php/php5.3.6/lib/php/PEAR/Config.php:650
Stack trace:
#0 /Applications/MAMP/bin/php/php5.3.6/lib/php/PEAR/RunTest.php(22): ZendPHPUnitErrorHandler->handle(8192, 'Assigning the r...', '/Applications/M...', 650, Array)
#1 /Applications/MAMP/bin/php/php5.3.6/lib/php/PEAR/RunTest.php(22): require_once()
#2 /Applications/MAMP/bin/php/php5.3.6/lib/php/PHPUnit/Extensions/PhptTestCase.php(49): require_once('/Applications/M...')
#3 /Applications/Zend Studio.app/Contents/Resources/Java/plugins/com.zend.php.phpunit_9.0.3.201206251721/resources/ZendPHPUnit.php(115): require_once('/Applications/M...')
#4 {main}
thrown


This needs to be turned off by ignoring E_DEPRECATED errors in Zend's PHP php.ini file wich I am searching right now...
sebastianbeyer
 
Posts: 15
Joined: Fri Aug 27, 2010 9:25 am

Re: Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x p

Postby sebastianbeyer on Thu Sep 20, 2012 4:00 pm

Also, there is a PHPUnitLibrary configuration param in Zend Studio Settings.

It looks editable, and even the cursor is in it, but you can't edit it for some weird reason!
Attachments
Bildschirmfoto 2012-09-20 um 16.58.51.png
Bildschirmfoto 2012-09-20 um 16.58.51.png (58.57 KiB) Viewed 1593 times
sebastianbeyer
 
Posts: 15
Joined: Fri Aug 27, 2010 9:25 am

Re: Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x p

Postby penetal on Thu Oct 04, 2012 5:29 pm

I have this problem too when trying to run my phpunit.xml file, I can run the tests one by one it seems, but that's just not feasible in the long run.
Have you found any solution to this problem as of yet?

I have installed, and using PHPUnit 3.7.1 from PEAR, and I have tried setting error_reporting to
Code: Select all
E_ALL & ~E_DEPRECATED
in ...\Zend\ZendServer\etc\php.ini but that seems to have no effect, and I don't know which other php.ini file PHPUnit can be using (run in Zend Studio 9.0.3).
penetal
 
Posts: 4
Joined: Sat Jun 30, 2012 2:27 am

Re: Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x p

Postby chiefbeef on Mon Oct 29, 2012 2:01 pm

Has anyone successfully downgraded from PHPUnit 3.6 to 3.5 yet?

I have seen the tutorial on dustyreagan, but that refers to a pear installation of phpunit. I need to change the version of phpunit that zend studio is using, which is contained within the plugins folders, not the zend server / pear / phpunit directory.
chiefbeef
 
Posts: 54
Joined: Wed Jul 29, 2009 9:04 pm

Re: Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x p

Postby chiefbeef on Tue Jan 08, 2013 12:52 pm

Revisiting a project and still having this issue, has anyone got a workaround?
chiefbeef
 
Posts: 54
Joined: Wed Jul 29, 2009 9:04 pm

Re: Switch PHPunit version from 3.6.x to 3.5.15 for ZF 1.x p

Postby ljthomas on Mon Jan 28, 2013 11:23 pm

I ran into this issue as well. This is an older post, but I figured I'd put my findings here anyway.

I used the link posted by Sebastian that points to Dusty Reagan's process of installing an older version of PHPUnit. I was able to successfully install the 3.5.15 stable version of PHPUnit.

The problem now is to get Zend Studio 9 to point to the older version of PHPUnit. To do this, in your Run/Debug settings add the environment variable, "ZEND_PHPUNIT_LOCATION". The value should point to the directory where the "PHPUnit" is installed (e.g. "/usr/local/zend/share/pear").

Keep in mind this will cause the error Sebastian also points out, and that is the E_DEPRECATED error setting. You can fix this by using the following line in your php.ini file:

error_reporting = E_ALL & ~E_DEPRECATED
ljthomas
 
Posts: 2
Joined: Thu Jan 24, 2013 3:53 am


Return to Zend Studio

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests