-
Notifications
You must be signed in to change notification settings - Fork 121
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
Exception: TheSeer\phpDox\ClassBuilderException #80
Comments
I had the exact same error. After inserting some var_dumps here and there, I found out that phpdox broke on a method docblock in one of the files. Here's the docblock it freaked out on:
Note the last line, it has a space between the @ and the Todo; a typo from one of our developers. But phpdox doesn't like it at all and throws an exception. Fixing the @todo parameter resulted in a succesful build of the documentation. I suppose it would be better if phpdox just ignored such typos? |
Thank you for reporting this issue. I agree that phpDox should be more robust with these kind of typos. Can you please verify if that problem persists with the latest phpdox code from GIT as that had some major refactoring being done? (Instructions on how to install dependencies are in the developer section of the https://github.com/theseer/phpdox/blob/master/README.markdown) |
Ok, built the 0.4.99 version from Git (did a git clone, pear package and pear install, but only the /usr/bin/phpdox executable was installed, I had to manually copy the src dir to $PEAR/TheSeer/phpDox) and installed the dependencies. I ran
So, this seems to be even more of a no go than the current PEAR build, 0.4.0. I gave up fixing the errors PHPParser produced after the nesting loop. On a side note, it's a tad challenging to figure out which file causes the problem. If you're lucky, the PHPParser_Error class gives you a line number, but there's no way to tell which file it refers to. I hacked the script TheSeer/phpDox/collector/Collector.php and added an |
The class ClassBuilder has been removed from phpDox during refactoring, the general stability on parse errors as well as other processing errors should be fixed. The nesting level limitation is not a PHP feature but something added by xdebug. While okay for general website development xdebug should be disabled on CLI tools as it slows down processing dramatically and adds various other limitations. The collector also outputs more detailed information, what files it had issues with in case it ran into any. |
I've got this exception during jenkins building php job on windows 7.
[exec] phpdox 0.4.0 - Copyright (C) 2010 - 2012 by Arne Blankerts
[exec]
[exec] [05.11.2012 - 13:14:26] Using config file 'E:\Web Development\Jenkins\workspace\coach\phpdox.xml'
[exec] [05.11.2012 - 13:14:26] Registered output engine 'html'
[exec] [05.11.2012 - 13:14:26] Registered output engine 'graph'
[exec] [05.11.2012 - 13:14:26] Registered output engine 'todo'
[exec] [05.11.2012 - 13:14:26] Registered output engine 'xslrunner'
[exec] [05.11.2012 - 13:14:26] Starting to process project 'name-of-project'
[exec] [05.11.2012 - 13:14:26] Starting collector
[exec]
[exec]
[exec]
[exec] Oups... phpDox encountered a problem and has terminated!
[exec] It most likely means you've found a bug, so please file a report for this and paste the stacktrace (if given) along!
[exec]
[exec] Exception: TheSeer\phpDox\ClassBuilderException
[exec] Location: E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\collector\ClassBuilder.php (Line 127)
[exec]
[exec] Processing DocBlock failed
[exec]
[exec] #0 E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\collector\ClassBuilder.php(92): TheSeer\phpDox\ClassBuilder->processMethods()
[exec] #1 E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\collector\Analyser.php(114): TheSeer\phpDox\ClassBuilder->process()
[exec] #2 E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\collector\Analyser.php(85): TheSeer\phpDox\Analyser->handleClass()
[exec] #3 E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\collector\Collector.php(89): TheSeer\phpDox\Analyser->processFile()
[exec] #4 E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\Application.php(123): TheSeer\phpDox\Collector->run()
[exec] #5 E:\Web Development\wamp\bin\php\php5.4.3\pear\TheSeer\phpDox\CLI.php(124): TheSeer\phpDox\Application->runCollector()
[exec] #6 E:\Web Development\wamp\bin\php\php5.4.3\phpdox(62): TheSeer\phpDox\CLI->run()
[exec]
[exec]
[exec]
[exec] .f
[exec] Result: 1
My build phpdox target:
"
"
My phpdox.xml file:
""
Is it some bug or my missconfiguration of something?
The text was updated successfully, but these errors were encountered: