Modify

Opened 7 months ago

Closed 5 months ago

#1091 closed defect (fixed)

Phing is not compatible with PHPUnit 4.x

Reported by: anonymous Owned by: mrook
Priority: major Milestone: 2.8.0
Component: phing-tasks-phpunit Version: 2.7.0
Keywords: Cc:

Description

the new release phpunit 4 doesn't work with phings phpunit task

Attachments (3)

phing1091.txt (4.6 KB) - added by matthew.ouyang@… 6 months ago.
stack trace
phing1091.2.txt (4.6 KB) - added by matthew.ouyang@… 6 months ago.
stack trace
phing1091.3.txt (4.6 KB) - added by matthew.ouyang@… 6 months ago.
stack trace

Download all attachments as: .zip

Change History (13)

Changed 6 months ago by matthew.ouyang@…

stack trace

Changed 6 months ago by matthew.ouyang@…

stack trace

Changed 6 months ago by matthew.ouyang@…

stack trace

comment:1 Changed 6 months ago by matthew.ouyang@…

I'm including a stack trace here since the attachment functionality does not appear to work.

PHP Fatal error:  Call to undefined method PHPUnit_Util_Test::getOutputBuffering
Settings() in C:\php\pear\PHPUnit\Framework\TestCase.php on line 536
PHP Stack trace:
PHP   1. {main}() C:\php\pear\phing.php:0
PHP   2. Phing::fire() C:\php\pear\phing.php:43
PHP   3. Phing::start() C:\php\pear\phing\Phing.php:278
PHP   4. Phing->runBuild() C:\php\pear\phing\Phing.php:170
PHP   5. Project->executeTargets() C:\php\pear\phing\Phing.php:586
PHP   6. Project->executeTarget() C:\php\pear\phing\Project.php:797
PHP   7. Target->performTasks() C:\php\pear\phing\Project.php:824
PHP   8. Target->main() C:\php\pear\phing\Target.php:320
PHP   9. Task->perform() C:\php\pear\phing\Target.php:297
PHP  10. UnknownElement->main() C:\php\pear\phing\Task.php:260
PHP  11. PhingCallTask->main() C:\php\pear\phing\UnknownElement.php:96
PHP  12. PhingTask->main() C:\php\pear\phing\tasks\system\PhingCallTask.php:158
PHP  13. PhingTask->processFile() C:\php\pear\phing\tasks\system\PhingTask.php:1
50
PHP  14. Project->executeTarget() C:\php\pear\phing\tasks\system\PhingTask.php:2
77
PHP  15. Target->performTasks() C:\php\pear\phing\Project.php:824
PHP  16. Target->main() C:\php\pear\phing\Target.php:320
PHP  17. Task->perform() C:\php\pear\phing\Target.php:297
PHP  18. UnknownElement->main() C:\php\pear\phing\Task.php:260
PHP  19. PHPUnitTask->main() C:\php\pear\phing\UnknownElement.php:96
PHP  20. PHPUnitTask->execute() C:\php\pear\phing\tasks\ext\phpunit\PHPUnitTask.
php:332
PHP  21. PHPUnitTestRunner->run() C:\php\pear\phing\tasks\ext\phpunit\PHPUnitTas
k.php:392
PHP  22. PHPUnit_Framework_TestSuite->run() C:\php\pear\phing\tasks\ext\phpunit\
PHPUnitTestRunner.php:118
PHP  23. PHPUnit_Framework_TestSuite->run() C:\php\pear\PHPUnit\Framework\TestSu
ite.php:705
PHP  24. PHPUnit_Framework_TestSuite->runTest() C:\php\pear\PHPUnit\Framework\Te
stSuite.php:745
PHP  25. PHPUnit_Framework_TestCase->run() C:\php\pear\PHPUnit\Framework\TestSui
te.php:775
PHP  26. PHPUnit_Framework_TestCase->setUseOutputBufferingFromAnnotation() C:\ph
p\pear\PHPUnit\Framework\TestCase.php:687

Fatal error: Call to undefined method PHPUnit_Util_Test::getOutputBufferingSetti
ngs() in C:\php\pear\PHPUnit\Framework\TestCase.php on line 536

Call Stack:
    0.0004     129320   1. {main}() C:\php\pear\phing.php:0
    0.0964    2726712   2. Phing::fire() C:\php\pear\phing.php:43
    0.0964    2726760   3. Phing::start() C:\php\pear\phing\Phing.php:278
    0.1023    2817224   4. Phing->runBuild() C:\php\pear\phing\Phing.php:170
    0.5727    8642576   5. Project->executeTargets() C:\php\pear\phing\Phing.php
:586
    0.5727    8642760   6. Project->executeTarget() C:\php\pear\phing\Project.ph
p:797
    0.5730    8643632   7. Target->performTasks() C:\php\pear\phing\Project.php:
824
    0.5733    8643912   8. Target->main() C:\php\pear\phing\Target.php:320
    0.5733    8643912   9. Task->perform() C:\php\pear\phing\Target.php:297
    0.5748    8646384  10. UnknownElement->main() C:\php\pear\phing\Task.php:260

    0.5748    8646384  11. PhingCallTask->main() C:\php\pear\phing\UnknownElemen
t.php:96
    0.5749    8646616  12. PhingTask->main() C:\php\pear\phing\tasks\system\Phin
gCallTask.php:158
    0.5749    8646856  13. PhingTask->processFile() C:\php\pear\phing\tasks\syst
em\PhingTask.php:150
    0.6169    8736160  14. Project->executeTarget() C:\php\pear\phing\tasks\syst
em\PhingTask.php:277
    0.6174    8736816  15. Target->performTasks() C:\php\pear\phing\Project.php:
824
    0.6176    8736816  16. Target->main() C:\php\pear\phing\Target.php:320
    0.6176    8736816  17. Task->perform() C:\php\pear\phing\Target.php:297
    0.6599    9253912  18. UnknownElement->main() C:\php\pear\phing\Task.php:260

    0.6599    9253912  19. PHPUnitTask->main() C:\php\pear\phing\UnknownElement.
php:96
    1.7594   12034752  20. PHPUnitTask->execute() C:\php\pear\phing\tasks\ext\ph
punit\PHPUnitTask.php:332
    1.7610   12039688  21. PHPUnitTestRunner->run() C:\php\pear\phing\tasks\ext\
phpunit\PHPUnitTask.php:392
    1.7635   12146000  22. PHPUnit_Framework_TestSuite->run() C:\php\pear\phing\
tasks\ext\phpunit\PHPUnitTestRunner.php:118
    1.7637   12149544  23. PHPUnit_Framework_TestSuite->run() C:\php\pear\PHPUni
t\Framework\TestSuite.php:705
    1.7659   12186240  24. PHPUnit_Framework_TestSuite->runTest() C:\php\pear\PH
PUnit\Framework\TestSuite.php:745
    1.7659   12186256  25. PHPUnit_Framework_TestCase->run() C:\php\pear\PHPUnit
\Framework\TestSuite.php:775
    1.7660   12186640  26. PHPUnit_Framework_TestCase->setUseOutputBufferingFrom
Annotation() C:\php\pear\PHPUnit\Framework\TestCase.php:687

comment:2 Changed 6 months ago by peter@…

I'm also seeing this with ping 2.7 and phpunit 4.0.12:

Execution of target "unittest" failed for the following reason: /var/lib/jenkins/jobs/XXXX/workspace/build.xml:4:21: /var/lib/jenkins/jobs/XXXX/workspace/build.xml:4:21: PHPUnitTask requires PHPUnit to be installed

comment:3 Changed 6 months ago by peter@…

Oh and a stack trace:

Stack trace: #0 /usr/share/php/phing/UnknownElement.php(213): PHPUnitTask->init() #1 /usr/share/php/phing/UnknownElement.php(171): UnknownElement->makeTask(Object(UnknownElement), Object(RuntimeConfigurable), true) #2 /usr/share/php/phing/UnknownElement.php(70): UnknownElement->makeObject(Object(UnknownElement), Object(RuntimeConfigurable)) #3 /usr/share/php/phing/Task.php(259): UnknownElement->maybeConfigure() #4 /usr/share/php/phing/Target.php(297): Task->perform() #5 /usr/share/php/phing/Target.php(320): Target->main() #6 /usr/share/php/phing/Project.php(824): Target->performTasks() #7 /usr/share/php/phing/Project.php(797): Project->executeTarget('unittest') #8 /usr/share/php/phing/Phing.php(586): Project->executeTargets(Array) #9 /usr/share/php/phing/Phing.php(170): Phing->runBuild() #10 /usr/share/php/phing/Phing.php(278): Phing::start(Array, NULL) #11 /usr/share/php/phing.php(43): Phing::fire(Array) #12 {main}

comment:4 Changed 6 months ago by mrook

  • Milestone changed from Backlog to 2.8.0
  • Priority changed from tbd to major
  • Status changed from new to assigned
  • Summary changed from phing doesn't find phpUnit 4.x to Phing is not compatible with PHPUnit 4.x

Thanks for the report.

comment:5 Changed 6 months ago by Michiel Rook

Refs #1091 - try to load phpunit through composer / phar

Changeset: ecd51b6b6e62fd97f27ce3838f84389173b1934e

comment:6 Changed 6 months ago by Michiel Rook

Refs #1091 - try to load phpunit through composer / phar

Changeset: ecd51b6b6e62fd97f27ce3838f84389173b1934e

comment:7 Changed 5 months ago by mrook

Also, PHPUnit is dropping PEAR support: https://github.com/sebastianbergmann/phpunit/issues/1229

comment:8 Changed 5 months ago by Michiel Rook

Refs #1091 - try to load phpunit through composer / phar

Changeset: ecd51b6b6e62fd97f27ce3838f84389173b1934e

comment:9 Changed 5 months ago by Michiel Rook

Refs #1091 - try to load phpunit through composer / phar

Changeset: ecd51b6b6e62fd97f27ce3838f84389173b1934e

comment:10 Changed 5 months ago by mrook

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed The owner will remain mrook.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.