Ticket #284 (new defect)
XSL Errors in coverage-report task
| Reported by: | anonymous | Owned by: | mrook |
|---|---|---|---|
| Priority: | major | Milestone: | TBD |
| Component: | phing-tasks-ext | Version: | 2.4.5 |
| Keywords: | Cc: |
Description
I get the following errors when using the coverage-report task:
[coverage-setup] Setting up coverage database for 48 files [coverage-report] Transforming coverage report I/O error : No such file or directory I/O error : No such file or directory [PHP Error] XSLTProcessor::transformToXml(): runtime error: file /usr/local/php5/lib/php/data/phing/etc/coverage-frames.xsl line 45 element document [line 85 of /usr/local/php5/lib/php/phing/tasks/ext/coverage/CoverageReportTransformer.php] [PHP Error] XSLTProcessor::transformToXml(): xsltDocumentElem: unable to save to efile:///Users/tobias/Desktop/succont.foundation/reports/coverage/index.html [line 85 of /usr/local/php5/lib/php/phing/tasks/ext/coverage/CoverageReportTransformer.php]
There is the same problem with the PHPUnit2report task:
I/O error : No such file or directory I/O error : No such file or directory [PHP Error] XSLTProcessor::transformToXml(): runtime error: file /Users/tobias/Desktop/succont.foundation/misc/phpunit2-frames.xsl line 44 element document [line 151 of /usr/local/php5/lib/php/phing/tasks/ext/phpunit/PHPUnitReportTask.php] [PHP Error] XSLTProcessor::transformToXml(): xsltDocumentElem: unable to save to efile:///Users/tobias/Desktop/succont.foundation/reports/tests/index.html [line 151 of /usr/local/php5/lib/php/phing/tasks/ext/phpunit/PHPUnitReportTask.php]
Attachments
Change History
comment:1 Changed 3 years ago by hans
- Status changed from new to closed
- Resolution set to worksforme
comment:3 Changed 8 months ago by ttom@…
- Status changed from closed to reopened
- Resolution worksforme deleted
Looks like this issue is still there in recent versions. I've been able to reproduce it right now with the following configuration:
<property name="pear.data" value="/usr/lib/php/data/" />
<coverage-report outfile="${project.basedir}/Build/Reports/coverage.xml">
<report todir="${project.basedir}/Build/Reports/Coverage" styledir="${pear.data}phing/etc/"/>
</coverage-report>
The error is the same one as above:
I/O error : No such file or directory [PHP Error] XSLTProcessor::transformToXml(): runtime error: file /usr/local/Cellar/php53osx/5.3.5/share/pear/data/phing/etc/coverage-frames.xsl line 46 element document [line 85 of /usr/local/Cellar/php53osx/5.3.5/share/pear/phing/tasks/ext/coverage/CoverageReportTransformer.php] [PHP Error] XSLTProcessor::transformToXml(): xsltDocumentElem: unable to save to efile:///Users/tobias/Desktop/Caffeine/Foundation.framework/Build/Reports/Coverage/index.html [line 85 of /usr/local/Cellar/php53osx/5.3.5/share/pear/phing/tasks/ext/coverage/CoverageReportTransformer.php]
I'm using Phing 2.4.5 on Mac OS.
comment:4 Changed 8 months ago by mrook
- Milestone changed from 2.3.1 to 2.4.6
As of r1123 paths are escaped before they are passed to the processor. Can you test using the latest sources (from SVN)?
comment:5 Changed 8 months ago by ttom@…
Nope, does not fix it. Used this to setup trunk:
svn export http://svn.phing.info/trunk phing
export PHING_HOME=/Users/tobias/Desktop/
export PHP_CLASSPATH=${PHING_HOME}/classes
export PATH=${PATH}:${PHING_HOME}/bin
pear.data is also changed to the new location:
pear.data=/Users/tobias/Desktop/
Result now looks like this:
I/O error : No such file or directory [PHP Error] XSLTProcessor::transformToXml(): runtime error: file /Users/tobias/Desktop/phing/etc/phpunit-frames.xsl line 46 element document [line 171 of /Users/tobias/Desktop/phing/classes/phing/tasks/ext/phpunit/PHPUnitReportTask.php] [PHP Error] XSLTProcessor::transformToXml(): xsltDocumentElem: unable to save to efile://%2FUsers%2Ftobias%2FDesktop%2FCaffeine%2FFoundation.framework%2FBuild%2FReports%2FTests/index.html [line 171 of /Users/tobias/Desktop/phing/classes/phing/tasks/ext/phpunit/PHPUnitReportTask.php]
comment:6 Changed 8 months ago by mrook
Strange. I don't have access to a Mac but I'll try to reproduce it :)
comment:7 Changed 8 months ago by Tobias Tom <ttom@…>
If you need more information, please feel free to ask. I'm currently also inside your IRC channel.
comment:8 Changed 8 months ago by mrook
- Owner changed from hans to mrook
- Status changed from reopened to new
Update after testing:
- ExtendedFileStream::registerStream() is called and succesfully registers the 'efile' stream wrapper
- Subsequent use of efile:// patterns in the stylesheet does not trigger the stream wrapper (ExtendedFileStream::stream_open() is never called)
- It seems this only happens on Mac OS X
Changed 8 months ago by mrook
-
attachment
284.zip
added
Testcase to (hopefully) reproduce the problem
comment:9 Changed 8 months ago by mrook
When running the testcase, make sure "styledir" points to the "etc" directory of your local Phing installation.
comment:10 Changed 8 months ago by Tobias Tom <ttom@…>
Just some more information about my machine and things I've tried to reproduce it:
<?php
include '/usr/local/Cellar/php53osx/5.3.5/share/pear/phing/Phing.php';
include '/usr/local/Cellar/php53osx/5.3.5/share/pear/phing/util/ExtendedFileStream.php';
$xsl = new XSLTProcessor();
var_dump($xsl->hasExsltSupport());
/* bool(true) */
phpinfo(INFO_GENERAL);
/* phpinfo()
PHP Version => 5.3.5
System => Darwin Miro.local 11.0.0 Darwin Kernel Version 11.0.0: Mon Jun 13 11:33:28 PDT 2011; root:xnu-1699.22.70~3/RELEASE_X86_64 x86_64
Build Date => Apr 4 2011 10:30:47
Configure Command => './configure' '--prefix=/usr/local/Cellar/php53osx/5.3.5' '--disable-debug' '--disable-dependency-tracking' '--with-config-file-path=/usr/local/etc' '--sysconfdir=/usr/local/Cellar/php53osx/5.3.5/etc' '--with-pear=/usr/local/Cellar/php53osx/5.3.5/share/pear/' '--enable-cgi' '--mandir=/usr/local/Cellar/php53osx/5.3.5/share/man' '--with-iconv-dir=/usr' '--with-apxs2=/usr/sbin/apxs' '--libexecdir=/usr/local/Cellar/php53osx/5.3.5/libexec' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/tmp/mysql.sock' '--with-pdo-sqlite=/usr' '--with-pgsql=/pg_config' '--with-pdo-pgsql=/pg_config' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local/Cellar/libpng/1.2.44' '--with-freetype-dir=/usr/X11' '--enable-gd-native-ttf' '--with-libxml-dir=/usr/local' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--with-pcre-regex' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl=/usr' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-xmlrpc' '--with-xsl' '--enable-zip' '--with-iodbc=/usr'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/Cellar/php53osx/5.3.5/etc/php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20090626
PHP Extension => 20090626
Zend Extension => 220090626
Zend Extension Build => API220090626,NTS
PHP Extension Build => API20090626,NTS
Debug Build => no
Thread Safety => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.1, Copyright (c) 2002-2011, by Derick Rethans */
var_dump(stream_wrapper_register('efile', 'ExtendedFileStream'));
/* bool(true) */
Phing::startup(); // required for property host.fstype
var_dump(file_put_contents('efile:///Users/tobias/Desktop/foo/bam/baz.txt', 'works'));
/* int(5) */
var_dump(file_get_contents('/Users/tobias/Desktop/foo/bam/baz.txt'));
/* string(5) "works" */
More readable version at https://gist.github.com/1043096
comment:11 Changed 8 months ago by jimbojsb
Not able to reproduce on Mac 10.6 with PHP 5.3.6, latest everything and phing pulled from SVN specifically for this test.
[josh@orangeslice ~/Downloads/phing/bin]$ ./phing -f ~/Downloads/284/build.xml Buildfile: /Users/josh/Downloads/284/build.xml
Hello World Example > prepare:
[delete] Deleting directory /Users/josh/Downloads/284/reports
[mkdir] Created dir: /Users/josh/Downloads/284/reports/coverage
Hello World Example > build:
[coverage-setup] Setting up coverage database for 1 files [coverage-report] Transforming coverage report
BUILD FINISHED
Total time: 0.4379 seconds
comment:12 Changed 7 months ago by danceric
unable to reproduce on OS X 10.6 with PHP 5.3.2 (from Zend Server Community Edition), PHPUnit 3.5.14 and Phing 2.4.5
comment:13 Changed 7 months ago by mrook
- Priority changed from blocker to major
- Version changed from 2.3.1RC1 to 2.4.5
- Milestone changed from 2.4.6 to TBD
Moving this to TBD for the time being; looking more and more like a local situation.

This is working fine for me (tested with a phpunit report generation, though did not test with coverage report - no errors). Please make sure you are using the phpunit tasks (not phpunit2) (granted, the stylesheet still has phpunit2 in the name). If you can confirm that this is still an issue (with soon-to-be-released 2.3.1), please re-open.