Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173496 - dev-php5/phpunit-3.0.5 needs php built with USE="tokenizer" to generate coverage reports
Summary: dev-php5/phpunit-3.0.5 needs php built with USE="tokenizer" to generate cover...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-05 18:29 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2007-08-15 16:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
diff against the ebuild in portage tree (phpunit.diff,622 bytes, patch)
2007-07-09 06:04 UTC, Niklas Närhinen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-04-05 18:29:26 UTC
Without it phpunit bails out on some coverage reports with stack traces like this:

Generating report, this may take a moment.
Fatal error: Call to undefined function token_get_all() in /usr/share/php5/PHPUnit/Util/Report/Coverage/Node/File.php on line 377

Call Stack:
    0.0003     125104   1. {main}() /usr/bin/phpunit:0
    0.0035     309984   2. require('/usr/share/php5/PHPUnit/TextUI/Command.php') /usr/bin/phpunit:44
    0.1115    5144360   3. PHPUnit_TextUI_Command::main() /usr/share/php5/PHPUnit/TextUI/Command.php:401
    0.1980    5851064   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php5/PHPUnit/TextUI/Command.php:100
    0.2330    6061872   5. PHPUnit_Util_Report::render() /usr/share/php5/PHPUnit/TextUI/TestRunner.php:258
    0.2334    6065088   6. PHPUnit_Util_Report_Coverage_Factory::create() /usr/share/php5/PHPUnit/Util/Report.php:84
    0.2377    6222496   7. PHPUnit_Util_Report_Coverage_Factory::addItems() /usr/share/php5/PHPUnit/Util/Report/Coverage/Factory.php:86
    0.2377    6223336   8. PHPUnit_Util_Report_Coverage_Node_Directory->addFile() /usr/share/php5/PHPUnit/Util/Report/Coverage/Factory.php:104
    0.2378    6225456   9. PHPUnit_Util_Report_Coverage_Node_File->__construct() /usr/share/php5/PHPUnit/Util/Report/Coverage/Node/Directory.php:136
    0.2379    6227424  10. PHPUnit_Util_Report_Coverage_Node_File->highlightFile() /usr/share/php5/PHPUnit/Util/Report/Coverage/Node/File.php:131

Note that token_get_all comes with tokenizer extension.

With tokenizer extension installed (USE="tokenizer") it works fine.
Comment 1 Niklas Närhinen 2007-07-09 06:04:09 UTC
Created attachment 124297 [details, diff]
diff against the ebuild in portage tree
Comment 2 Markus Ullmann (RETIRED) gentoo-dev 2007-08-13 09:50:29 UTC
Fixed in CVS, thankies :)
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-08-15 15:58:41 UTC
On that note, you should file a bug upstream, since tokenizer is marked as optional extension in package.xml (even w/ latest 3.1.7 version).

required - dom, pcre, reflection, spl
optional - json, pdo, pdo_mysql, pdo_sqlite, tokenizer, xdebug

http://www.phpunit.de/report
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-08-15 16:12:22 UTC
It is optional, in the meaning that you can run unit tests without tokenizer. You just can't generate coverage reports without it. I don't know if they won't reject such a bug report then.