-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many exceptions running phpdox #99
Comments
This looks like phpDox tries to load a broken or empty source.xml file left from a probably crashed previous run. Can you remove the work directory ("build/phpdox") and give it another run? The followup exception looks like a crash in the error handler. I'll look into that one for this is new. |
Removed the entire contents of the directory and continue to get the same error with source.xml. Any chance it gets generated by something that breaks, and the process continues?
|
Another note, here are some contents of src/
|
phpDox seems to have a hard time finding any actual source files. I'm a bit at a loss as to why, since using your phpdox.xml file and creating files in a directory structure like you posted, i do not get that problem. As a side effect of this, you found a bug in my collecting process. While the index file is actually valid xml, the saved source.xml file is broken (causing the crash on the generator step) in case no files are found. Is there a chance you can provide me with the php code you try to process - or a a small subset where the problem persists? |
That's really interesting... I'm getting the same behavior on my local machine (Mac OS X 10.8.3) and my CI server (Ubuntu 12.04). Here's an excerpt... src/MarkII/Bundle/DashboardBundle/DataFixtures/ORM/LoadUserData.php:
|
Bizarre... From the files I created for testing, I get a working output on my devel maschine (Fedora 18, PHP 5.4.15) as well as on an older CenOS box (5.9, PHP 5.3.10): theseer@nyda /tmp/issue-99 $ phpdox [30.05.2013 - 23:53:20] Using config file '/tmp/issue-99/phpdox.xml' ..... [5] [30.05.2013 - 23:53:20] Saving results to directory 'build/phpdox' ..... [5] [30.05.2013 - 23:53:20] Collector process completed ................................ [32] [30.05.2013 - 23:53:20] Triggering raw engines [30.05.2013 - 23:53:20] Generator process completed Time: 0 seconds, Memory: 5.25Mb |
Alright, I'll do a bit more digging and see if I can come up with anything. Thanks for your help. |
Also tried an empty new issue99 folder: bash-3.2# ll There is only the php source excerpt you posted in there. bash-3.2# phpdox [31.05.2013 - 00:14:38] Using config file '/root/issue-99/phpdox.xml' . [1] [31.05.2013 - 00:14:38] Saving results to directory 'build/phpdox' . [1] [31.05.2013 - 00:14:38] Collector process completed ................ [16] [31.05.2013 - 00:14:38] Triggering raw engines [31.05.2013 - 00:14:38] Generator process completed Time: 0 seconds, Memory: 7.50Mb |
Do we have any update on this problem? |
I was experiencing a similar error, my logs had lots of these lines:
After grepping everything, found the following snippet from the PHPParser package (PHPParser/PHPParser/Lexer.php, line 42) which was causing the source.xml not be written correctly:
Changed it to:
And now everything is working. |
@marlin-forbes Got the same problem with phpdox and xdebug enabled. xdebug.scream flag completely disable the @ operator, hence the errors. Commenting this flag in /etc/php5/cli/conf.d/xdebug.ini did the trick for me. |
Having xdebug enabled during execution of phpDox is not recommended as it has quite a drastic impact on performance and some options like the nesting level limitations can cause unexpected crashes. |
As a secondary side note, phpDox does not contain any error suppression itself though of course some of the libraries used my do so. To counter the effects of the scream feature of xdebug as well as other potentially problematic settings, I just added some ini_set() calls to disable them during the execution of phpDox. |
Even with the XDebug changes, I'm getting a similar issue: Oups... phpDox encountered a problem and has terminated! Exception: TheSeer\fDOM\fDOMException loading file 'build/logs/checkstyle.xml' failed. [XML-STRING] [Line: 0 - Column: 0] Warning 1549: failed to load external entity "/path/to/website/build/logs/checkstyle.xml" #0 /path/to/website/vendor/theseer/phpdox/src/generator/enricher/checkstyle/CheckStyle.php(19): TheSeer\phpDox\Generator\Enricher\CheckStyle->loadFindings() I'm directly using the options spit out from --skel... not really changing anything other than the source path and the output path. PhpDox was installed via composer. |
I'm getting a similar problem trying to run phpdox from a jenkins-php template job:
|
@macnewbold I opened a new bug for that since it has nothing to do with bug. As a workaround, remove the node from the config as in phar mode, phpDox will find its templates automagically. |
@Morgon You are trying to use enrichers with a default config. Enrichers are work in progress and will be shipped starting the 0.6 release. The path ""/path/to/website/build/logs/checkstyle.xml" looks invalid to me. As of now, the part "build/logs/checkstyle.xml" is hardcoded within the enricher, that will obviously change prior to release. |
I'm closing this issue since for the original problem there was no update. |
Running the latest version with a fairly simple config on a small codebase is failing rather hard... can't quite figure out what's up.
phpdox.xml:
output:
The text was updated successfully, but these errors were encountered: